摘要:
1.TypeError: must be str, not bytes错误: 解答: 写文件处open(filename, 'w').write 应该写为open(filename, 'wb').write2.当文本文件里面有中文时,需要进行编码转换,(在网上查了很多都不行) with open("C://ch.js", encoding="utf-8") as data1: for oneLine in data1: print(oneLine) 编码转换:content = str(open(filepath).rea 阅读全文
posted @ 2012-07-31 16:48
wrong boy
阅读(955)
评论(2)
推荐(0)
浙公网安备 33010602011771号