importlib.abc.FileLoader

class importlib.abc.FileLoader(fullname, path)

An abstract base class which inherits from ResourceLoader and ExecutionLoader, providing concrete implementations of ResourceLoader.get_data() and ExecutionLoader.get_filename().

The fullname argument is a fully resolved name of the module the loader is to handle. The path argument is the path to the file for the module.

New in version 3.3.

name

The name of the module the loader can handle.

path

Path to the file of the module.

load_module(fullname)

Calls super’s load_module().

Deprecated since version 3.4: Use Loader.exec_module() instead.

abstractmethod get_filename(fullname)

Returns path.

abstractmethod get_data(path)

Reads path as a binary file and returns the bytes from it.

doc_python
2016-10-07 17:34:30
Comments
Leave a Comment

Please login to continue.