python讀取中文名的文件一直比較麻煩
目前得到的可靠解決方案:
coding=utf-8
strPath = "類.py" #這里的strpath是你的中文路徑名
a = unicode(strPath , "utf-8")
print list(fileinput.input(a))
python讀取中文名的文件一直比較麻煩
目前得到的可靠解決方案:
strPath = "類.py" #這里的strpath是你的中文路徑名
a = unicode(strPath , "utf-8")
print list(fileinput.input(a))