The platform
module in Python provides functions that access information of the underlying platform (operating system).
For different architectural information, the platform.architecture()
method queries the specified executable (defaults to the Python interpreter binary). The return value is a tuple of size two where the first element indicates the bit architecture (the number of bits in the processor) and the second element indicates the linkage format used for the executable.
architecture(executable=sys.executable, bits='', linkage='')
executable
: The executable to query.bits
: Represents the bit architecture.linkage
: Represents the linkage format.A tuple containing the bit architecture and the linkage format of the executable.
import platformprint("platform.architecture() = " , platform.architecture())
platform
module.architecture()
method.