The Platform module provides information about the underlying system platform
System architecture
32-bit or 64-bit
>>>ImportPlatform>>>platform.architecture () ('64bit','ELF')#python 3.3.2+ bits on debian Jessie('32bit','WindowsPE')#python 3.3.2 bits on Windows 8.1('64bit','WindowsPE')#python 3.3.2 bits on Wndows 8.1('64bit',"')#python 3.4.1 bits on Mac OS X 10.9.4
Elf and windowsPE are executable file formats
Operating system
Linux,mac or Windows
>>>Platform.system ()'Linux'#python 3.3.2+ bits on debian Jessie'Windows'#python 3.3.2 bits on Windows 8.1'Windows'#python 3.3.2 bits on Windows 8.1'Darwin'#python 3.4.1 bits on Mac OS X 10.9.4#orImportSYS>>>Sys.platform'Win32'
System version
>>>platform.version ()'#1 SMP Debian 3.10.11-1 (2013-09-10)'#python 3.3.2+64 bits on debian Jessie'6.2.9200'#python 3.3.2 bits on Windows 8.1'6.2.9200'#python 3.3.2 bits on Windows 8.1'Darwin Kernel Version 13.3.0:tue June 3 21:27:35 PDT; root:xnu-2422.110.17~1/release_x86_64'#python 3.4.1 bits on Mac OS X 10.9.4
CPU Platform
>>> platform.dist ('debian','jessie/sid' ")# python 3.3.2+ bits on debian Jessie
Node name
Which is the machine name.
>>> Platform.node ()'work'# python 3.3.2+-bits on Debian Jessie'work-xxx'# python 3.3.2 on Windows 8.1 bits
System Information
>>>platform.uname () Uname_result (System='Linux', node=' Work', release='3.10-3-amd64', version='#1 SMP Debian 3.10.11-1 (2013-09-10)', machine='x86_64', processor="')#python 3.3.2+64 bits on debian JessieUname_result (System='Windows', node='work-xxx', release='8', version='6.2.9200', machine='AMD64', processor='Intel64 Family 6 Model stepping 9,Genuineintel') # python 3.3.2 bits on Windows 8.1Uname_result (System='Darwin', node='MBA', release='13.3.0', version='Darwin Kernel Version 13.3.0:tue June 3 21:27:35 PDT; root:xnu-2422.110.17~1/release_x86_64', machine='x86_64', processor='i386')#python 3.4.1 bits on Mac OS X 10.9.4
Python version
>>> Platform.python_verison ()'3.3.2+'# python 3.3.2+ 64 Bits on Debian Jessie"3.3.3"# python 3.3.2
Python gets operating system platform, version, and architecture