How to use os module (only for Unix) In Python
Example:
Python3
import os print (os.uname()) |
Output:
(‘Linux’, ‘mycomputer.domain.user’, ‘2.6.18-92.1.22.el5PAE’, ‘#1 SMP Tue APR 16 12:36:25 EST 2020’, ‘i686’)
Get Your System Information – Using Python Script
Getting system information for your system can easily be done by the operating system in use, Ubuntu let’s say. But won’t it be fun to get this System information using Python script? In this article, we will look into various ways to derive your system information using Python.
There are two ways to get information:
- Using Platform module
- subprocess