ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
## [platform][1] — Access to underlying platform’s identifying data 访问底层平台的识别数据 ```python #!/usr/bin/env python #coding: utf8 import platform platform.system() # Linux platform.release() # platform.platform() #获取操作系统名称及版本号,'Windows-7-6.1.7601-SP1' platform.version() #获取操作系统版本号,'6.1.7601' platform.architecture() #获取操作系统的位数,('32bit', 'WindowsPE') platform.machine() #计算机类型,'x86' platform.node() #计算机的网络名称,'hongjie-PC' platform.processor() #计算机处理器信息,'x86 Family 16 Model 6 Stepping 3, AuthenticAMD' platform.uname() #包含上面所有的信息汇总,uname_result(system='Windows', node='hongjie-PC',release='7', version='6.1.7601', machine='x86', processor='x86 Family 16 Model 6 Stepping 3, AuthenticAMD') platform.python_build() platform.python_compiler() platform.python_branch() platform.python_implementation() platform.python_revision() platform.python_version() platform.python_version_tuple() ``` [1]:https://docs.python.org/3/library/platform.html