python --检测当前操作系统
import platform
if ('Windows' == platform.system()):
print('Windows')
elif ('Linux' == platform.system()):
print('Linux')
else:
print('Others')
from sys import platform
if ("linux" == platform) or ("linux2" == platform):
print("Linux")
elif ("win32" == platform):
print("Linux")
else:
print("Others")