_modules module¶
-
exception
pyflyby._modules.ErrorDuringImportError¶ Exception raised by import_module if the module exists but an exception occurred while attempting to import it. That nested exception could be ImportError, e.g. if a module tries to import another module that doesn’t exist.
-
class
pyflyby._modules.ModuleHandle¶ A handle to a module.
-
_cls_cache= {}¶
-
classmethod
_from_filename(filename)¶
-
classmethod
_from_module(module)¶
-
classmethod
_from_modulename(modulename)¶
-
ancestors¶ Computes attribute value and caches it in instance.
Example:
class MyClass(object): @cached_attribute def myMethod(self): # ...
Use “del inst.myMethod” to clear cache.
-
block¶ Computes attribute value and caches it in instance.
Example:
class MyClass(object): @cached_attribute def myMethod(self): # ...
Use “del inst.myMethod” to clear cache.
-
classmethod
containing(identifier)¶ Try to find the module that defines a name such as
a.b.cby trying to importa,a.b, anda.b.c.- Returns
The name of the ‘deepest’ module (most commonly it would be
a.bin this example).- Return type
Module
-
exists¶ Computes attribute value and caches it in instance.
Example:
class MyClass(object): @cached_attribute def myMethod(self): # ...
Use “del inst.myMethod” to clear cache.
-
exports¶ Computes attribute value and caches it in instance.
Example:
class MyClass(object): @cached_attribute def myMethod(self): # ...
Use “del inst.myMethod” to clear cache.
-
filename¶ Computes attribute value and caches it in instance.
Example:
class MyClass(object): @cached_attribute def myMethod(self): # ...
Use “del inst.myMethod” to clear cache.
-
static
list(*args, **kwargs)¶
-
module¶ Computes attribute value and caches it in instance.
Example:
class MyClass(object): @cached_attribute def myMethod(self): # ...
Use “del inst.myMethod” to clear cache.
-
parent¶ Computes attribute value and caches it in instance.
Example:
class MyClass(object): @cached_attribute def myMethod(self): # ...
Use “del inst.myMethod” to clear cache.
-
submodules¶ Computes attribute value and caches it in instance.
Example:
class MyClass(object): @cached_attribute def myMethod(self): # ...
Use “del inst.myMethod” to clear cache.
-
text¶ Computes attribute value and caches it in instance.
Example:
class MyClass(object): @cached_attribute def myMethod(self): # ...
Use “del inst.myMethod” to clear cache.
-
-
pyflyby._modules._my_iter_modules(path, prefix='')¶
-
pyflyby._modules.pyc_to_py(filename)¶