发布时间:2019-09-21 10:49:27编辑:auto阅读(2929)
转载自:http://blog.csdn.net/yukin_xue/article/details/9769803
Python直接读取中文路径的文件时失败,可做如下处理:
dst3 = "D:/test/测试文件夹.txt"
uipath = unicode(dst3 , "utf8")
然后用"uipath"经过编码后的路径去open()或者:
shutil.copyfile(src,uipath)
就可以了
上一篇: Gearman Python
下一篇: 10个Python练手项目
54696
41472
36068
31544
26442
26147
24671
20258
16223
15641
2675°
2420°
2528°
2663°
2615°
2840°
2755°
2601°
2626°
2603°