In this article, we will see how we can show information about our system i.e processor name, name of system etc.
The Platform module is used to retrieve as much possible information about the platform on which the program is being currently executed. Now by platform info, it means information about the device, it’s OS, node, OS version, Python version, etc. This module plays a crucial role when you want to check whether your program is compatible with the python version installed on a particular system or whether the hardware specifications meet the requirements of your program.
In order to do this we need to import platform module.
import platform
Below is the Python implementation –
import platform
info = {}
platform_details = platform.platform()
info["platform details"] = platform_details
system_name = platform.system()
info["system name"] = system_name
processor_name = platform.processor()
info["processor name"] = processor_name
architecture_details = platform.architecture()
info["architectural detail"] = architecture_details
for i, j in info.items():
print(i, " - ", j)
Output :
platform details - Windows-10-10.0.17134-SP0
system name - Windows
processor name - Intel64 Family 6 Model 158 Stepping 10, GenuineIntel
architectural detail - ('64bit', 'WindowsPE')
Note : Output may vary based on you system architecture.
Don't miss your chance to ride the wave of the data revolution! Every industry is scaling new heights by tapping into the power of data. Sharpen your skills and become a part of the hottest trend in the 21st century.
Dive into the future of technology - explore the Complete Machine Learning and Data Science Program by GeeksforGeeks and stay ahead of the curve.
Last Updated :
26 Mar, 2020
Like Article
Save Article
Share your thoughts in the comments
Add Your Comment
Please Login to comment...