參考:https://blog.csdn.net/wss794/article/details/86503171
import platform
if __name__ == '__main__':
sys = platform.system()
if sys == "Windows":
print("OS is Windows!!!")
elif sys == "Linux":
print("OS is Linux!!!")
pass
else:
pass
js的話,你可以請求python的服務器來判斷