python-codecs.open()使用举例

 

代码:

 1 import codecs
 2 from unidecode import unidecode
 3 
 4 def main():
 5     fullFilename="123.txt"
 6     inFID=codecs.open(fullFilename,'r','utf-8')    
 7     ALines = inFID.readlines()
 8     for k in range(len(ALines)): 
 9         ALines[k] = unidecode(ALines[k])
10         print(ALines[k])
11     inFID.close()
12             
13 main()

 

参考:

http://blog.csdn.net/suofiya2008/article/details/5579413

posted @ 2016-07-22 14:10  月色深潭  阅读(1608)  评论(0编辑  收藏  举报