How to get the system info with Python?
Hello, internet people today we code How to get the system info with Python? As you know python is awesome blah blah… let’s code.
We use platform module to do that. Python defines an in-built module platform that provides system information.
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, its 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.
check platform module here
Code
import platform
print(f"Node: {platform.node()}")
print(f"Plateform: {platform.platform()}")
print(f"System: {platform.system()}")
print(f"Processor: {platform.processor()}")
print(f"Architecture: {platform.architecture()}")
print(f"Version: {platform.version()}")
print(f"Release: {platform.release()}")
#follow @code_snail
Output
Try this code and follow me on Instagram @code_snail
Also, see,