摘要: 参考: "StringIO和BytesIO" NOTE 1.StringIO: 顾名思义就是在内存中读写str。 getvalue()方法用于获得写入后的str。 2.BytesIO: 如果要操作二进制数据,就需要使用BytesIO. 用法和StringIO没差多少,只不过数据需要使用二进制流。 2 阅读全文
posted @ 2017-03-15 21:41 Wasdns 阅读(191) 评论(0) 推荐(0) 编辑
摘要: 参考: "TypeError: unicode argument expected, got 'str'" Python代码: 解释器报错: stackoverflow上对这个问题的解释是: io.StringIO is confusing in Python 2.7 because it's ba 阅读全文
posted @ 2017-03-15 20:39 Wasdns 阅读(3238) 评论(0) 推荐(0) 编辑