标签:txt sdn class tle pytho path 中文 get base
Python直接读取中文路径的文件时失败,可做如下处理:
inpath = ‘D:/work/yuanxx/在线导航/驾车导航/walk_log/20130619_172355.txt‘
uipath = unicode(ipath , "utf8")
然后用"uipath"经过编码后的路径去open()即可:
fin = open(uipath)
标签:txt sdn class tle pytho path 中文 get base
原文地址:http://www.cnblogs.com/whm-blog/p/7133090.html