Lines Matching +full:module +full:- +full:importer
1 """Benchmark some basic import use-cases.
4 thus has no external changes made to import-related attributes in sys.
37 count -= 1
43 module = imp.new_module(name)
44 module.__file__ = '<test>'
45 module.__package__ = ''
47 sys.modules[name] = module
52 """Built-in module"""
56 # Relying on built-in importer being implicit.
79 def _wo_bytecode(module): argument
80 name = module.__name__
83 bytecode_path = imp.cache_from_source(module.__file__)
117 def _writing_bytecode(module): argument
118 name = module.__name__
124 os.unlink(imp.cache_from_source(module.__file__))
149 def _using_bytecode(module): argument
150 name = module.__name__
153 py_compile.compile(module.__file__)
228 parser.add_argument('-b', '--builtin', dest='builtin', action='store_true',
229 default=False, help="use the built-in __import__")
230 parser.add_argument('-r', '--read', dest='source_file',
234 parser.add_argument('-w', '--write', dest='dest_file',
237 parser.add_argument('--benchmark', dest='benchmark',