platform.machine()

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

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.libc_ver()

platform.libc_ver(executable=sys.executable, lib='', version='', chunksize=2048) Tries to determine the libc version against which the file executable (defaults to the Python interpreter) is linked. Returns a tuple of strings (lib, version) which default to the given parameters in case the lookup fails. Note that this function has intimate knowledge of how different libc versions add symbols to the executable is probably only usable for executables compiled using gcc. The file is read and sc

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

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.iter_importers()

pkgutil.iter_importers(fullname='') Yield PEP 302 importers for the given module name. If fullname contains a ‘.’, the importers will be for the package containing fullname, otherwise they will be all registered top level importers (i.e. those on both sys.meta_path and sys.path_hooks). If the named module is in a package, that package is imported as a side effect of invoking this function. If no module name is specified, all top level importers are produced. Changed in version 3.3: Updated

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.