Module arch
source code
Information about the current system's architecture.
This module provides information about the current system. It is used
to determine whether an implementation is suitable for this machine, and
to compare different implementations.
For example, it will indicate that:
-
An i486 machine cannot run an i686 binary.
-
An i686 machine can run an i486 binary, but would prefer an i586 one.
-
A Windows binary cannot run on a Linux machine.
Each dictionary maps from a supported architecture type to a
preference level. Lower numbers are better, Unsupported architectures are
not listed at all.
|
p = sys.platform
|
|
os_ranks = _get_os_ranks(_uname [0])
|
|
machine_groups = {'x86_64': 64, 'ppc64': 64,}
|
|
machine_ranks = _get_machine_ranks(_uname [-1])
|
Get an Architecture that matches binaries that will work on the given
system.
- Parameters:
os (str) - OS type, or None for host's type
machine (str) - CPU type, or None for host's type
- Returns: Architecture
- an Architecture object
|