系统是 Windows Linux"/>
python 获取系统是 Windows Linux
platform 模块 sys模块
Windows上
In [1]: import platformIn [2]: platform.system()
Out[2]: 'Windows'In [3]: import sysIn [4]: sys.platform
Out[4]: 'win32'
linux中
>>> import platform
>>> platform.system()
'Linux'
>>> import sys
>>> sys.platform
'linux'
参考:Python获取系统是Windows linux
更多推荐
python 获取系统是 Windows Linux
发布评论