Last Version: | 0.2.1 |
---|
This module provides utilities for module control, such as getting module object, name, version, copyright, documentation, list of presented classes (without imported or built-in classes), file, directory, etc.
Return module name. If the __name__ attribute does not exist, default is returned. By default default is None. If module_name was not provided, the caller’s module will be used.
Return path to directory from where script with module was invoked. If module_name was not provided, the caller’s module will be used.
Return the name of the (text or binary) file in which the module module_name was defined. If module_name does not provided the caller’s module will be used.
This function allows to find files next to module file. For example, the path to the setup.py from a given distribution package can be obtained as follows: module.get_file(__name__, 'setup.py').
Return all the classes of a module module_name in a list of (name, value) pairs. The list does not include imported or built-in classes. If module was not provided, the caller’s module will be used.
Return module object of a module module_name. If module_name was not provided the caller’s module will be used.
Return module version. If the __version__ attribute does not exist, default is returned. If module_name was not provided, the caller’s module will be used.
Set module version. If module_name does not provided the caller’s module will be used.
Return a string containing the copyright pertaining to the module module_name. If the __copyright__ attribute does not exist, default is returned. If module_name was not provided, the caller’s module will be used.
Set module copyright. If module_name does not provided the caller’s module will be used.
Return the documentation string for a module module_name. If module_name was not provided, the caller’s module will be used.
The base class for the exceptions related to module.
Alexander Sviridenko <oleks.sviridenko at gmail.com>
Copyright (c) 2011 Alexander Sviridenko. Some rights reserved.