亂碼
1、中文亂碼
import sys
reload(sys)
sys.setdefaultencoding('utf-8') #允許打印unicode字符
2、對于中文路徑的讀入可以這樣:(假設(shè)filepath是你要讀出的含有中文的文件路徑):
filepath=unicode(filepath,'utf8')
fobj=open(filepath,"r")
3、# -- coding: utf-8 --
文件配置
更換系統(tǒng)或者復(fù)制系統(tǒng)文件,配置路徑需要更改
參數(shù)默認
有默認值的參數(shù)可以缺省