0 votes
1 view
in Python by (1.6k points)
What do I need to look at to see whether I'm on Windows or Unix, etc?

1 Answer

0 votes
by (260 points)

You can use the os module to get the name, version... of the current operating system.

import os
os.uname() # gives information about the operating system

os.uname().sysname. # To get the name of the os.

os.uname().version # To get the version .

Related questions

Welcome to Intellipaat Community. Get your technical queries answered by top developers !