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/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/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/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))
src/p/y/pypy-HEAD/py/_code/source.py pypy(Download)
from __future__ import generators import sys import inspect, tokenize import py from types import ModuleType cpy_compile = compile
# XXX py3's inspect.getsourcefile() checks for a module
# and a pep302 __loader__ ... we don't have a module
# at code compile-time so we need to fake it here
m = ModuleType("_pycodecompile_pseudo_module")
py.std.inspect.modulesbyfile[filename] = None
py.std.sys.modules[None] = m
m.__loader__ = 1
src/i/r/ironruby-HEAD/External.LCA_RESTRICTED/Languages/IronPython/27/Lib/new.py ironruby(Download)
from types import FunctionType as function from types import InstanceType as instance from types import MethodType as instancemethod from types import ModuleType as module from types import CodeType as code
src/i/r/ironruby-HEAD/External.LCA_RESTRICTED/Languages/CPython/27/Lib/new.py ironruby(Download)
from types import FunctionType as function from types import InstanceType as instance from types import MethodType as instancemethod from types import ModuleType as module from types import CodeType as code
src/p/y/pylibs-HEAD/py/_plugin/standalonetemplate.py pylibs(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))
src/j/y/jython-HEAD/sandbox/tobias/jython/CPythonLib/new.py jython(Download)
from types import FunctionType as function from types import InstanceType as instance from types import MethodType as instancemethod from types import ModuleType as module # CodeType is not accessible in restricted execution mode try:
src/w/e/webnest-HEAD/env/lib/python2.6/site-packages/bpython/urwid.py webnest(Download)
import os import locale import signal from types import ModuleType from optparse import Option from pygments.token import Token
# __main__ construction from bpython.cli
if locals_ is None:
main_mod = sys.modules['__main__'] = ModuleType('__main__')
locals_ = main_mod.__dict__
if options.plugin:
src/w/e/webnest-HEAD/env/lib/python2.6/site-packages/bpython/cli.py webnest(Download)
from locale import LC_ALL, setlocale import locale from types import ModuleType # These are used for syntax hilighting. from pygments import format
main_win, statusbar = init_wins(scr, cols, config)
if locals_ is None:
sys.modules['__main__'] = ModuleType('__main__')
locals_ = sys.modules['__main__'].__dict__
interpreter = repl.Interpreter(locals_, getpreferredencoding())
1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 Next