platform模块给我们提供了很多方法去获取操作系统的信息; import platform

print(platform.platform())# 获取操作系统名称和版本号:macOS-10.14.6-x86_64-i386-64bit
print(platform.system())# 获取操作系统:Darwin
print(platform.version()) # 获取计算机操作系统版本号:arwin Kernel Version 18.7.0: Mon Mar 8 22:11:48 PST 2021; root:xnu-1903.288.66~1/RELEASE_X86_64
print(platform.release()) #获取计算机操作系统的版本 18.7.0
print(platform.architecture()) #获取操作系统的位数 ('64bit', '')
print(platform.node()) # 计算机网络名称 yanzis-MacBook-Pro.local
print(platform.machine()) #计算机类型 x86_64
print(platform.processor()) #计算机处理器信息 i386
print(platform.uname())#获取以上信息的综合:uname_result(system='Darwin', node='yanzis-MacBook-Pro.local', release='18.7.0', version='Darwin Kernel Version 18.7.0: Mon Mar 8 22:11:48 PST 2021; root:xnu-1903.288.66~1/RELEASE_X86_64', machine='x86_64')

参考自:https://blog.csdn.net/holly_08/article/details/117960407

最新文章

  1. python字符串连接的N种方式
  2. c/c++中两颗璀璨的明珠
  3. sql insert into select语句写法-将查询结果直接插入到表中
  4. Python 虚拟环境:Virtualenv
  5. visualSVN server库迁移
  6. EasyPusher推流服务接口的.NET导出
  7. 关于Delphi XE2的FMX的一点点研究之消息篇
  8. Tomcat禁止外网访问
  9. 多个php版本的composer使用
  10. 【学习笔记】tensorflow文件读取
  11. Mysql双主热备+LVS+Keepalived高可用部署实施手册
  12. POJ - 1681: Painter's Problem (开关问题-高斯消元)
  13. 全志A33开发板的安卓控制LED-2-JNI基础
  14. IDEA远程仓库版本回滚
  15. egret获取本周,上周,今天,昨天,明天,现在时间,今年,本月
  16. VUE2.0 饿了吗视频学习笔记(一):VUE示例data.json
  17. zzulioj 1734 堆
  18. Python Extension 编译问题
  19. C#学习笔记(十六):索引器和重载运算符
  20. IDA error of " positive sp value has been found"

热门文章

  1. TiDB日常运维手册
  2. C语言联合体(共用体)使用方法及大小计算
  3. cisco-RIPv2重分发缺省路由
  4. CH582m模拟JoyStick使用USB与电脑通信
  5. Experience Cloud
  6. Unity简单使用 Addressables远端打包流程
  7. vxWidgets(二):接口文档
  8. LAN8720 调试笔记
  9. Log4net使用探究
  10. 「SOL」Permanent (Codeforces)