importlib.abc.ExecutionLoader

class importlib.abc.ExecutionLoader

An abstract base class which inherits from InspectLoader that, when implemented, helps a module to be executed as a script. The ABC represents an optional PEP 302 protocol.

abstractmethod get_filename(fullname)

An abstract method that is to return the value of __file__ for the specified module. If no path is available, ImportError is raised.

If source code is available, then the method should return the path to the source file, regardless of whether a bytecode was used to load the module.

Changed in version 3.4: Raises ImportError instead of NotImplementedError.

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

Please login to continue.