📜  Sys 获取你使用的操作系统名称 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:04.849000             🧑  作者: Mango

代码示例1
if sys.platform.startswith('freebsd'):
    # FreeBSD-specific code here...
elif sys.platform.startswith('linux'):
    # Linux-specific code here...
elif sys.platform.startswith('aix'):
    # AIX-specific code here...