New in version 2.3.
Note
Specific platforms listed alphabetically, with Linux included in the Unixsection.
Queries the given executable (defaults to the Python interpreter binary) forvarious architecture information.
Returns a tuple(bits,linkage) which contain information about the bitarchitecture and the linkage format used for the executable. Both values arereturned as strings.
Values that cannot be determined are returned as given by the parameter presets.If bits is given as'', thesizeof(pointer) (orsizeof(long) on Python version < 1.5.2) is used as indicator for thesupported pointer size.
The function relies on the system’sfile command to do the actual work.This is available on most if not all Unix platforms and some non-Unix platformsand then only if the executable points to the Python interpreter. Reasonabledefaults are used when the above needs are not met.
Returns a single string identifying the underlying platform with as much usefulinformation as possible.
The output is intended to behuman readable rather than machine parseable. Itmay look different on different platforms and this is intended.
Ifaliased is true, the function will use aliases for various platforms thatreport system names which differ from their common names, for example SunOS willbe reported as Solaris. Thesystem_alias() function is used to implementthis.
Settingterse to true causes the function to return only the absolute minimuminformation needed to identify the platform.
Returns the (real) processor name, e.g.'amdk6'.
An empty string is returned if the value cannot be determined. Note that manyplatforms do not provide this information or simply return the same value as formachine(). NetBSD does this.
Returns a string identifying the Python implementation SCM branch.
New in version 2.6.
Returns a string identifying the Python implementation. Possible return valuesare: ‘CPython’, ‘IronPython’, ‘Jython’
New in version 2.6.
Returns a string identifying the Python implementation SCM revision.
New in version 2.6.
Returns the Python version as string'major.minor.patchlevel'
Note that unlike the Pythonsys.version, the returned value will alwaysinclude the patchlevel (it defaults to 0).
Returns the Python version as tuple(major,minor,patchlevel) of strings.
Note that unlike the Pythonsys.version, the returned value will alwaysinclude the patchlevel (it defaults to'0').
Fairly portable uname interface. Returns a tuple of strings(system,node,release,version,machine,processor) identifying the underlying platform.
Note that unlike theos.uname() function this also returns possibleprocessor information as additional tuple entry.
Entries which cannot be determined are set to''.
Version interface for JPython.
Returns a tuple(release,vendor,vminfo,osinfo) withvminfo being atuple(vm_name,vm_release,vm_vendor) andosinfo being a tuple(os_name,os_version,os_arch). Values which cannot be determined are set tothe defaults given as parameters (which all default to'').
Get additional version information from the Windows Registry and return a tuple(version,csd,ptype) referring to version number, CSD level and OS type(multi/single processor).
As a hint:ptype is'UniprocessorFree' on single processor NT machinesand'MultiprocessorFree' on multi processor machines. The‘Free’ refersto the OS version being free of debugging code. It could also state‘Checked’which means the OS version uses debugging code, i.e. code that checks arguments,ranges, etc.
Note
Note: this function works best with Mark Hammond’swin32all package installed, but also on Python 2.3 andlater (support for this was added in Python 2.6). It obviouslyonly runs on Win32 compatible platforms.
Get Mac OS version information and return it as tuple(release,versioninfo,machine) withversioninfo being a tuple(version,dev_stage,non_release_version).
Entries which cannot be determined are set to''. All tuple entries arestrings.
Documentation for the underlyinggestalt API is available online athttp://www.rgaros.nl/gestalt/.
Tries to determine the name of the Linux OS distribution name.
supported_dists may be given to define the set of Linux distributions tolook for. It defaults to a list of currently supported Linux distributionsidentified by their release file name.
Iffull_distribution_name is true (default), the full distribution readfrom the OS is returned. Otherwise the short name taken fromsupported_dists is used.
Returns a tuple(distname,version,id) which defaults to the args given asparameters.id is the item in parentheses after the version number. Itis usually the version codename.
Tries to determine the libc version against which the file executable (defaultsto 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 versionsadd symbols to the executable is probably only usable for executables compiledusinggcc.
The file is read and scanned in chunks ofchunksize bytes.
curses.panel — A panel stack extension for curses.
errno — Standard errno system symbols