我要查看我是在Windows还是Unix等上,我需要查看什么?
3 回答
紫衣仙女
TA贡献1839条经验 获得超15个赞
使用python区分操作系统的示例代码:
from sys import platform as _platform
if _platform == "linux" or _platform == "linux2":
# linux
elif _platform == "darwin":
# MAC OS X
elif _platform == "win32":
# Windows
elif _platform == "win64":
# Windows 64-bit
添加回答
举报
0/150
提交
取消