python 判断操作系统以及操作系统版本号

Posted sea-stream

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了python 判断操作系统以及操作系统版本号相关的知识,希望对你有一定的参考价值。

 

>>> import platform
>>> platform.platform()
Darwin-17.7.0-x86_64-i386-64bit
>>> platform.system()
Darwin


>>> import platform
>>> platform.system()
Windows


>>> import platform
>>> platform.system()
Linux


参考:
https://www.cnblogs.com/SunshineKimi/p/10890415.html
https://blog.csdn.net/lixianlin/article/details/80866598

 

以上是关于python 判断操作系统以及操作系统版本号的主要内容,如果未能解决你的问题,请参考以下文章

渗透测试之操作系统识别

EF框架操作postgresql,实现WKT类型坐标的插入,查询,以及判断是否相交

如何查看python的当前版本号

Python|Python操作Word的格式的研究思路

Windows 11 快速体验:开始菜单居中,全系圆角设计!

利用POI操作不同版本号word文档中的图片以及创建word文档