importlib.abc.FileLoader.load_module()

load_module(fullname) Calls super’s load_module(). Deprecated since version 3.4: Use Loader.exec_module() instead.

importlib.abc.FileLoader.get_filename()

abstractmethod get_filename(fullname) Returns path.

importlib.abc.FileLoader.get_data()

abstractmethod get_data(path) Reads path as a binary file and returns the bytes from it.

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. loa

importlib.abc.ExecutionLoader.get_filename()

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.

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 b

ImportError

exception ImportError Raised when an import statement fails to find the module definition or when a from ... import fails to find a name that is to be imported. The name and path attributes can be set using keyword-only arguments to the constructor. When set they represent the name of the module that was attempted to be imported and the path to any file which triggered the exception, respectively. Changed in version 3.3: Added the name and path attributes.

imghdr.what()

imghdr.what(filename, h=None) Tests the image data contained in the file named by filename, and returns a string describing the image type. If optional h is provided, the filename is ignored and h is assumed to contain the byte stream to test.

imghdr.tests

imghdr.tests A list of functions performing the individual tests. Each function takes two arguments: the byte-stream and an open file-like object. When what() is called with a byte-stream, the file-like object will be None. The test function should return a string describing the image type if the test succeeded, or None if it failed.

imaplib.Time2Internaldate()

imaplib.Time2Internaldate(date_time) Convert date_time to an IMAP4 INTERNALDATE representation. The return value is a string in the form: "DD-Mmm-YYYY HH:MM:SS +HHMM" (including double-quotes). The date_time argument can be a number (int or float) representing seconds since epoch (as returned by time.time()), a 9-tuple representing local time an instance of time.struct_time (as returned by time.localtime()), an aware instance of datetime.datetime, or a double-quoted string. In the last case,