时间:2021-07-01 10:21:17 帮助过:63人阅读
mac上这么干
代码如下:
localhost:~ apple$ python
Python 2.5.1 (r251:54863, Jun 17 2009, 20:37:34)
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import platform
>>> platform.mac_ver()
('10.5.8', ('', '', ''), 'i386')
>>> platform.version()
'Darwin Kernel Version 9.8.0: Wed Jul 15 16:55:01 PDT 2009; root:xnu-1228.15.4~1/RELEASE_I386'
>>> platform.platform()
'Darwin-9.8.0-i386-32bit'
>>> platform.system()
'Darwin'
>>>