摘要: 使用chardet模块来判断数据的编码;输入参数为str类型。 #coding:utf-8 import chardet f =open('hadoop.txt','r') #打开文本文件,只读 about=f.read() #读取文本内容 print cchardet.detect(about) 阅读全文
posted @ 2017-05-24 23:04 兰昌 阅读(694) 评论(0) 推荐(0) 编辑