Following from this OS-agnostic question, specifically this response, similar to data available from the likes of /proc/meminfo on Linux, how can I read system information from Windows using Python (including, but not limited to memory usage).
In Windows, if you want to get info like from the SYSTEMINFO command, you can use the WMI module.
import wmi
c = wmi.WMI()
systeminfo = c.Win32_ComputerSystem()[0]
Manufacturer = systeminfo.Manufacturer
Model = systeminfo.Model
...
similarly, the os-related info could be got from osinfo = c.Win32_OperatingSystem()[0]
the full list of system info is here and os info is here
There was a similar question asked:
How to get current CPU and RAM usage in Python?
There are quite a few answers telling you how to accomplish this in windows.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With