
解决PyCharm中os.system执行含中文的命令时出现乱码问题
5星
- 浏览量: 0
- 大小:None
- 文件类型:None
简介:
本篇文章将介绍如何在使用Python集成开发环境PyCharm时,解决通过os.system函数执行包含中文字符的命令导致的乱码问题。
source = [C:\\Users\\admin\\Desktop\\pythonLearning]
target_dir = C:\\Users\\admin\\Desktop
print(time.strftime(%Y%m%d%H%M%S))
target = target_dir + os.sep + time.strftime(%Y%m%d%H%M%S) + .zip
if not os.path.exists(target_dir):
os.mkdir(target_dir)
zip_command = HaoZipC a {0} {1}
全部评论 (0)
还没有任何评论哟~


