Obviously 64-bit system, why python sys.platform display win 32?

Obviously 64-bit system, why sys.platform display win 32?
In python:

>>>import sys
>>>print(sys.platform)
win32

But my win7 64-bit systems is clearly, I ask why?

In fact, this `win32` should refer to the Win32 API.
If you really care about architecture, then you can use the package `platform`
>>> Import Platform
>>> platform.machine ()
AMD64
and Python are not 32-bit does not matter

Further distinguish between little os, sys, platform three modules

os operating system provides interfaces commonly used file system-related and related processes
such as:
os.path.walk (directory traversal)
os.getpid (get the process id)


sys python interpreter system provides general configuration and function, affecting the interpreter acts
Note that the system here is not the operating system, but the python interpreter of this "system,"
such as:
sys.version (python version instead os version)
sys. path (path search module, not os environment variable)
sys.getrecursionlimit (maximum number of layers of nested calls)
sys.getrefcount (get an object reference count)

platform to provide relevant information platforms
such as:
platform.architecture (operating system and the number of bits)
platform.processor (processor version)

Published 85 original articles · won praise 78 · Views 1.59 million +

Guess you like

Origin blog.csdn.net/studyvcmfc/article/details/103920577