Python: What OS am I running on?

前端 未结 26 1573
野趣味
野趣味 2020-11-22 05:44

What do I need to look at to see whether I\'m on Windows or Unix, etc?

26条回答
  •  情歌与酒
    2020-11-22 06:29

    in the same vein....

    import platform
    is_windows=(platform.system().lower().find("win") > -1)
    
    if(is_windows): lv_dll=LV_dll("my_so_dll.dll")
    else:           lv_dll=LV_dll("./my_so_dll.so")
    

提交回复
热议问题