Lines Matching defs:in
13 warnpy3k("the imputil module has been removed in Python 3.0", stacklevel=2)
17 import imp ### not available in Jython?
28 _ModuleType = type(sys) ### doesn't work in Jython...
65 # we're definitely going to be importing something in the future,
80 for desc in imp.get_suffixes():
120 # In the former case, there is no way that we could import
121 # sub-modules that occur in the fromlist (but we can't raise an
125 # In the latter case (__ispkg__ == 0), there can't be any sub-
128 # In both cases, since len(parts) == 1, the top_module is also
150 """Returns the context in which a module should be imported.
181 # if a module in a package is performing the import, then return the
189 # scan sys.path looking for a location in the filesystem that contains
191 for item in sys.path:
241 # now, or in the past and we fetched it from sys.modules).
249 # note: if it is not a package, then "fromlist" refers to names in
251 # note: for a mix of names and modules in the fromlist, we will
255 # we imported and stored in the namespace, others are expected
308 exec code in module.__dict__
310 if fqname in sys.modules:
315 # also make module's __name__ agree with fqname, in case
316 # the "exec code in module.__dict__" played games on us.
324 Returns the last module in the dotted list of modules.
326 for part in parts:
334 'Import any sub-modules in the "from" list.'
336 # if '*' is present in the fromlist, then look for the '__all__'
338 if '*' in fromlist:
342 for sub in fromlist:
396 is provided in case the module's code expects certain values (such
453 if 'posix' in names:
456 elif 'nt' in names:
459 elif 'dos' in names:
462 elif 'os2' in names:
549 for submodule_path in parent.__path__:
567 for suffix, importFunc in self.suffixes:
617 for name, module in items:
633 # type(sys) is not a module in Jython. what to use instead?
634 # imp.C_EXTENSION is not in Jython. same for get_suffixes and new_module
643 # <module 'sys' (built-in)>
654 # should BuiltinImporter exist in sys.path or hard-wired in ImportManager?
682 # CRLF handling in _compile
683 # race condition in _compile
694 # We could cache this in a dictionary: the ImportManager can have a
697 # in the cache. The method should do a stat and/or look at the
710 # > 1) implementing policy in ImportManager assists in single-point policy
712 # > 2) implementing policy in Importer assists in package-private policy