All Samples(1236) | Call(879) | Derive(84) | Import(273)
module(name[, doc]) Create a module object. The name must be a string; the optional doc argument can have any type.
src/r/e/reporter-lib-HEAD/packages/pyparsing/examples/stateMachine2.py reporter-lib(Download)
src/b/a/badger-lib-HEAD/packages/pyparsing/examples/stateMachine2.py badger-lib(Download)
src/p/y/pyparsing-1.5.5/examples/stateMachine2.py pyparsing(Download)
src/g/p/gpyconf-HEAD/examples/unittests/all_fields.py gpyconf(Download)
def _all(module):
from types import ModuleType
for attr in dir(module):
if attr == 'Field':
continue
if attr.startswith('_'):
continue
src/j/y/jython-HEAD/sandbox/tobias/jython/Lib/xml/parsers/expat.py jython(Download)
def _init_model():
global model
model = types.ModuleType("pyexpat.model")
model.__doc__ = "Constants used to interpret content model information."
quantifiers = "NONE, OPT, REP, PLUS"
for i, quantifier in enumerate(quantifiers.split(", ")):
setattr(model, "XML_CQUANT_" + quantifier, i)
def _init_errors():
global errors
errors = types.ModuleType("pyexpat.errors")
errors.__doc__ = "Constants used to describe error conditions."
error_names = """
src/z/o/zope.app.twisted-3.5.0/src/twisted/spread/jelly.py zope.app.twisted(Download)
from types import FloatType from types import FunctionType from types import MethodType from types import ModuleType from types import DictionaryType from types import InstanceType from types import NoneType
src/j/y/jython-HEAD/jython/Lib/xml/parsers/expat.py jython(Download)
def _init_model():
global model
model = types.ModuleType("pyexpat.model")
model.__doc__ = "Constants used to interpret content model information."
quantifiers = "NONE, OPT, REP, PLUS"
for i, quantifier in enumerate(quantifiers.split(", ")):
setattr(model, "XML_CQUANT_" + quantifier, i)
def _init_errors():
global errors
errors = types.ModuleType("pyexpat.errors")
errors.__doc__ = "Constants used to describe error conditions."
error_names = """
src/z/3/z3ext-HEAD/deprecated/z3ext.content.ext.urlmapper/trunk/src/z3ext/content/ext/urlmapper/generations/__init__.py z3ext(Download)
if 'z3ext.contentextensions' not in sys.modules:
sys.modules['z3ext.contentextensions'] = \
types.ModuleType('z3ext.contentextensions')
sys.modules['z3ext.contentextensions.urlmapper'] = \
types.ModuleType('z3ext.contentextensions.urlmapper')
sys.modules[modId] = types.ModuleType(modId)
src/z/3/z3ext-HEAD/deprecated/z3ext.content.ext.language/trunk/src/z3ext/content/ext/language/generations/__init__.py z3ext(Download)
if 'z3ext.contentextensions' not in sys.modules:
sys.modules['z3ext.contentextensions'] = \
types.ModuleType('z3ext.contentextensions')
sys.modules['z3ext.contentextensions.language'] = \
types.ModuleType('z3ext.contentextensions.language')
sys.modules[modId] = types.ModuleType(modId)
src/p/y/pypy-HEAD/py/_plugin/standalonetemplate.py pypy(Download)
def load_module(self, fullname):
# print "load_module:", fullname
from types import ModuleType
try:
s = self.sources[fullname]
is_pkg = False
except KeyError:
s = self.sources[fullname+'.__init__']
is_pkg = True
co = compile(s, fullname, 'exec')
module = sys.modules.setdefault(fullname, ModuleType(fullname))
1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 Next