I want to check the operating system (on the computer where the script runs).
I know I can use os.system(\'uname -o\') in Linux, but it gives me a messa
os.system(\'uname -o\')
If you want to know on which platform you are on out of "Linux", "Windows", or "Darwin" (Mac), without more precision, you should use:
>>> import platform >>> platform.system() 'Linux' # or 'Windows'/'Darwin'
The platform.system function uses uname internally.
uname