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 message in the console, and I want to write to a variable.
It will be okay if the script can tell if it is Mac, Windows or Linux. How can I check it?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…