标签:\n close 路径 path import key += for name
#codeing:utf-8
import os
#搞定WINDOWS下所有系统路径
filename=‘c:\\WINDOWS_ALL_PATH.txt‘
f=open(filename,‘w‘)
i=1
for path_name in os.environ.keys():
f.write(‘{0:0>2}‘.format(i)+". "+‘{0: <30}‘.format(path_name))
f.write(" "+os.environ[path_name])
f.write(‘\r\n‘)
i+=1
f.close()
标签:\n close 路径 path import key += for name
原文地址:https://www.cnblogs.com/dengpeiyou/p/9246241.html