Member-only story

Get system information using python

Allwin Raju
3 min readSep 23, 2021

--

Photo by Possessed Photography on Unsplash

Python provides a built-in module called “platform” that enables us to fetch some of the information about our system such as OS, processor, system version, etc

Let us look at some of the methods one by one with an example for each

1. Machine type

The machine() method returns the machine type of the user. An empty string is returned if the value cannot be determined.

Machine type

2. Computer’s name

The node() method returns the computer’s network name. An empty string is returned if the value cannot be determined.

Computer’s name

3. System OS

The platform() method returns a single string identifying the underlying platform with as much useful information as possible.

This can give various information such as the OS, OS version, processor etc all in a single string.

--

--

No responses yet