Skip to main content

module/import related stuff

Project description

Convenience functions related to modules and importing.

Function import_module_name(module_name, name, path=None, lock=None)

Import module_name and return the value of name within it.


  • module_name: the module name to import.
  • name: the name within the module whose value is returned; if name is None, return the module itself.
  • path: an array of paths to use as sys.path during the import.
  • lock: a lock to hold during the import (recommended).

Function module_attributes(M)

Generator yielding the names and values of attributes from a module which were defined in the module.

Function module_files(M)

Generator yielding .py pathnames involved in a module.

Function module_names(M)

Return a list of the names of attributes from a module which were defined in the module.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for, version 20190101
Filename, size File type Python version Upload date Hashes
Filename, size (2.2 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page