importlib.util.cache_from_source()

importlib.util.cache_from_source(path, debug_override=None, *, optimization=None) Return the PEP 3147/PEP 488 path to the byte-compiled file associated with the source path. For example, if path is /foo/bar/baz.py the return value would be /foo/bar/__pycache__/baz.cpython-32.pyc for Python 3.2. The cpython-32 string comes from the current magic tag (see get_tag(); if sys.implementation.cache_tag is not defined then NotImplementedError will be raised). The optimization parameter is used to sp

importlib.reload()

importlib.reload(module) Reload a previously imported module. The argument must be a module object, so it must have been successfully imported before. This is useful if you have edited the module source file using an external editor and want to try out the new version without leaving the Python interpreter. The return value is the module object (which can be different if re-importing causes a different object to be placed in sys.modules). When reload() is executed: Python module’s code is re

importlib.machinery.WindowsRegistryFinder

class importlib.machinery.WindowsRegistryFinder Finder for modules declared in the Windows registry. This class implements the importlib.abc.Finder ABC. Only class methods are defined by this class to alleviate the need for instantiation. New in version 3.3.

importlib.machinery.SourcelessFileLoader.name

name The name of the module the loader will handle.

importlib.machinery.SourcelessFileLoader.get_source()

get_source(fullname) Returns None as bytecode files have no source when this loader is used.

importlib.machinery.SourcelessFileLoader.load_module()

load_module(name=None)

importlib.machinery.SourcelessFileLoader.is_package()

is_package(fullname) Determines if the module is a package based on path.

importlib.machinery.SourcelessFileLoader

class importlib.machinery.SourcelessFileLoader(fullname, path) A concrete implementation of importlib.abc.FileLoader which can import bytecode files (i.e. no source code files exist). Please note that direct use of bytecode files (and thus not source code files) inhibits your modules from being usable by all Python implementations or new versions of Python which change the bytecode format. New in version 3.3. name The name of the module the loader will handle. path The path to the

importlib.machinery.SourceFileLoader.path_stats()

path_stats(path) Concrete implementation of importlib.abc.SourceLoader.path_stats().

importlib.machinery.SourcelessFileLoader.get_code()

get_code(fullname) Returns the code object for name created from path.