platform.linux_distribution()

platform.linux_distribution(distname='', version='', id='', supported_dists=('SuSE', 'debian', 'redhat', 'mandrake', ...), full_distribution_name=1) Tries to determine the name of the Linux OS distribution name. supported_dists may be given to define the set of Linux distributions to look for. It defaults to a list of currently supported Linux distributions identified by their release file name. If full_distribution_name is true (default), the full distribution read from the OS is returned.

platform.platform()

platform.platform(aliased=0, terse=0) Returns a single string identifying the underlying platform with as much useful information as possible. The output is intended to be human readable rather than machine parseable. It may look different on different platforms and this is intended. If aliased is true, the function will use aliases for various platforms that report system names which differ from their common names, for example SunOS will be reported as Solaris. The system_alias() function i

platform.machine()

platform.machine() Returns the machine type, e.g. 'i386'. An empty string is returned if the value cannot be determined.

pkgutil.walk_packages()

pkgutil.walk_packages(path=None, prefix='', onerror=None) Yields (module_finder, name, ispkg) for all modules recursively on path, or, if path is None, all accessible modules. path should be either None or a list of paths to look for modules in. prefix is a string to output on the front of every module name on output. Note that this function must import all packages (not all modules!) on the given path, in order to access the __path__ attribute to find submodules. onerror is a function which

platform.dist()

platform.dist(distname='', version='', id='', supported_dists=('SuSE', 'debian', 'redhat', 'mandrake', ...)) This is another name for linux_distribution(). Deprecated since version 3.5, will be removed in version 3.7.

platform.java_ver()

platform.java_ver(release='', vendor='', vminfo=('', '', ''), osinfo=('', '', '')) Version interface for Jython. Returns a tuple (release, vendor, vminfo, osinfo) with vminfo being a tuple (vm_name, vm_release, vm_vendor) and osinfo being a tuple (os_name, os_version, os_arch). Values which cannot be determined are set to the defaults given as parameters (which all default to '').

platform.architecture()

platform.architecture(executable=sys.executable, bits='', linkage='') Queries the given executable (defaults to the Python interpreter binary) for various architecture information. Returns a tuple (bits, linkage) which contain information about the bit architecture and the linkage format used for the executable. Both values are returned as strings. Values that cannot be determined are returned as given by the parameter presets. If bits is given as '', the sizeof(pointer) (or sizeof(long) on

pkgutil.iter_modules()

pkgutil.iter_modules(path=None, prefix='') Yields (module_finder, name, ispkg) for all submodules on path, or, if path is None, all top-level modules on sys.path. path should be either None or a list of paths to look for modules in. prefix is a string to output on the front of every module name on output. Note Only works for a finder which defines an iter_modules() method. This interface is non-standard, so the module also provides implementations for importlib.machinery.FileFinder and zipi

pkgutil.get_importer()

pkgutil.get_importer(path_item) Retrieve a PEP 302 importer for the given path_item. The returned importer is cached in sys.path_importer_cache if it was newly created by a path hook. The cache (or part of it) can be cleared manually if a rescan of sys.path_hooks is necessary. Changed in version 3.3: Updated to be based directly on importlib rather than relying on the package internal PEP 302 import emulation.

pkgutil.ImpLoader

class pkgutil.ImpLoader(fullname, file, filename, etc) PEP 302 Loader that wraps Python’s “classic” import algorithm. Deprecated since version 3.3: This emulation is no longer needed, as the standard import mechanism is now fully PEP 302 compliant and available in importlib.