saryli

python直接读取中文路径的文件时失败,可做如下处理:

 inpath = \'D:/work/yuanxx/在线导航/驾车导航/walk_log/20130619_172355.txt\'
 uipath = unicode(ipath , "utf8")

然后用"uipath"经过编码后的路径去open()即可:

 fin = open(uipath)

分类:

技术点:

相关文章:

  • 2022-02-09
  • 2021-10-08
  • 2022-12-23
  • 2022-02-09
  • 2022-02-27
  • 2022-02-09
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-11-25
  • 2022-02-08
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案