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 ofNotImplementedError
.
Please login to continue.