python判断平台

网上找到的判断平台的方法,特此记录

# -*- coding: utf-8 -*-
import platform osName = platform.system()
if(osName == 'Windows'):
import windowsEngine as engine
elif(osName == 'Linux'):
import linuxEngine as engine
elif(osName == 'Darwin'):
import macEngine as engine if __name__ == "__main__":
print(platform.system())

  

上一篇:Hive和Jdbc示例


下一篇:[SDOi2012]吊灯