module
|
|
module
|
|
module
|
|
list(str)
|
modpath_from_file(filename,
extrapath=None)
given a file path return the corresponding splitted module's name
(i.e name of a module or package splitted on '.') |
source code
|
|
str or None
|
file_from_modpath(modpath,
path=None,
context_file=None)
given a mod path (i.e. splitted module / package name), return the
corresponding file, giving priority to source file over precompiled
file if it exists |
source code
|
|
str or None
|
|
list
|
get_modules(package,
src_directory,
blacklist=STD_BLACKLIST)
given a package directory return a list of all available python
modules in the package and its subpackages |
source code
|
|
list
|
get_module_files(src_directory,
blacklist=STD_BLACKLIST)
given a package directory return a list of all available python
module's files in the package and its subpackages |
source code
|
|
str
|
get_source_file(filename,
include_no_ext=False)
given a python module's file name return the matching source file
name (the filename will be returned identically if it's a already an
absolute path to a python source file...) |
source code
|
|
|
cleanup_sys_modules(directories)
remove submodules of directories from sys.modules |
source code
|
|
|
is_python_source(filename)
rtype: bool
return: True if the filename is a python source file |
source code
|
|
bool
|
is_standard_module(modname,
std_path=(STD_LIB_DIR,))
try to guess if a module is a standard python module (by default,
see std_path parameter's description) |
source code
|
|
bool
|
is_relative(modname,
from_file)
return true if the given module name is relative to the given
file name |
source code
|
|