This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from axiom import attributes, item, store | |
import jinja2 | |
import sys | |
from twisted.cred import checkers, portal | |
from twisted.conch import manhole, manhole_ssh | |
from twisted.internet import reactor | |
from twisted.python import log | |
from twisted.web import resource, server |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from twisted.protocols import amp | |
class NestedAMPBox(amp.AmpList): | |
def fromStringProto(self, inString, proto): | |
value, = amp.AmpList.fromStringProto(self, inString, proto) | |
return value | |
def toStringProto(self, inObject, proto): | |
return amp.AmpList.toStringProto(self, [inObject], proto) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ComposedLocator(object): | |
""" | |
A responder locator that consists of other locators. | |
""" | |
interface.implements(amp.IResponderLocator) | |
class __metaclass__(type): | |
def __new__(meta, name, bases, attrs): | |
""" | |
Makes sure every subclass gets its own set of locator classes. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
import StringIO | |
from zope import interface | |
from twisted.internet import abstract, defer, reactor | |
from twisted.web import client, http_headers, iweb | |
class _FileProducer(object): # pragma: no cover | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class C1(object): | |
class __metaclass__(type): | |
def __new__(meta, name, bases, attrs): | |
attrs["sentinel"] = object() | |
return type(name, bases, attrs) | |
class C2(object): | |
class __metaclass__(type): | |
def __new__(meta, name, bases, attrs): | |
attrs["sentinel"] = object() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
AMP over WebSockets support. | |
""" | |
import json | |
import txws | |
from twisted.internet import defer, protocol | |
from twisted.python import log | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
meese is a built-in package. | |
Status: Built-in. | |
Summary: protect the impressionable young minds of America | |
Adds a hook to protect the impressionable young minds of America | |
from reading certain files in the Emacs distribution using Emacs. | |
This file is named after Ed Meese, the US Attorney General |
NewerOlder