-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathshow_sysconfig.py
executable file
·33 lines (27 loc) · 980 Bytes
/
show_sysconfig.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
#!/usr/local/bin/python3
# ===================================== #
# NAME : show_sysconfig.py
# LANGUAGE : Python
# VERSION : 3
# AUTHOR : Bryan Dady
# UPDATED : 11/1/2019 - reference working with system config variables
# ===================================== #
import sys
import sysconfig
import time
print('Start {}: {}\n'.format(sys.argv[0], time.strftime('%Y %m %d %H:%M:%S %Z', time.localtime())))
# print python system config (dictionary)
print('')
print('Python ''Host''/Shell (system) config:')
print(' # # #')
for k, v in sysconfig.get_config_vars().items():
print(f' {k} = {v}')
print(' # # #')
print('')
# possibly interesting / useful sysconfig properties to reference
# access value example: "py_version_short" :: sysconfig.get_config_var('py_version_short')
# py_version = 3.6.8
# py_version_short = 3.6
# HOST_GNU_TYPE = x86_64-pc-linux-gnu
print('\nEnd : {}'.format(time.strftime('%Y %m %d %H:%M:%S %Z', time.localtime())))
#sys.exit(0)