Skip to content

Commit d210dc9

Browse files
committed
添加 sys.path 参数
1 parent a92fd73 commit d210dc9

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

Temp/debug/env/interpreterInfo.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,13 @@
99
obj["versionInfo"] = tuple(sys.version_info)
1010
obj["sysPrefix"] = sys.prefix
1111
obj["sysVersion"] = sys.version
12-
obj["is64Bit"] = sys.maxsize > 2 ** 32
12+
obj["sysPath"] = sys.path
13+
obj["sysPlatform"] = sys.platform
14+
obj["is64Bit"] = sys.maxsize > 2**32
1315
obj["PWD"] = os.environ.get('PWD')
1416
obj["VIRTUAL_ENV"] = os.environ.get('VIRTUAL_ENV')
1517

16-
values = json.dumps(obj)
18+
values = json.dumps(obj, indent=4)
1719
# print(values)
1820
print('ref: ./Temp/debug/env/interpreterInfo.json')
1921
with open('./Temp/debug/env/interpreterInfo.json', 'w') as file:

Temp/debug/env/printEnvVariables.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import os
55
import json
66

7-
values = json.dumps(dict(os.environ))
7+
values = json.dumps(dict(os.environ), indent=4)
88
# print(values)
99
print('ref: ./Temp/debug/env/printEnvVariables.json')
1010
with open('./Temp/debug/env/printEnvVariables.json', 'w') as file:

0 commit comments

Comments
 (0)