forked from cclauss/Ten-lines-or-less
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplatform_info.py
42 lines (38 loc) · 1.68 KB
/
platform_info.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import inspect
import platform
for name, value in inspect.getmembers(platform):
if name[0] != "_" and callable(value):
try:
value = value()
except (IndexError, TypeError):
continue
if str(value).strip("(),' "):
print("{:>21}() = {}".format(name, value))
# import sys
# print(sys.platform, sys.version)
"""
architecture() = ('64bit', '')
mac_ver() = ('11.0.3', ('', '', ''), 'iPad5,4')
machine() = iPad5,4
node() = CCC-iPad
platform() = Darwin-17.0.0-iPad5,4-64bit
python_build() = ('default', 'Aug 24 2017 16:20:00')
python_compiler() = GCC 4.2.1 Compatible Apple LLVM 8.1.0 (clang-802.0.42)
python_implementation() = CPython
python_version() = 3.6.1
python_version_tuple() = ('3', '6', '1')
release() = 17.0.0
system() = Darwin
uname() = uname_result(system='Darwin', node='CCC-iPad',
release='17.0.0',
version='Darwin Kernel Version 17.0.0: '
'Fri Sep 1 14:59:13 PDT 2017; '
'root:xnu-4570.2.5~167/'
'RELEASE_ARM64_T7001',
machine='iPad5,4', processor='')
version() = ('Darwin Kernel Version 17.0.0: '
'Fri Sep 1 14:59:13 PDT 2017; '
'root:xnu-4570.2.5~167/RELEASE_ARM64_T7001')
ios 3.6.1 (default, Aug 24 2017, 16:20:00)
[GCC 4.2.1 Compatible Apple LLVM 8.1.0 (clang-802.0.42)]
"""