摘要: 模拟浏览器请求头 写入数据 文件夹 python 字符串长度 python100例:https://www.cnblogs.com/devin-guwz/p/5738676.html https://www.cnblogs.com/huangcong/archive/2011/08/29/21582 阅读全文
posted @ 2017-12-21 16:27 程序生(Codey) 阅读(618) 评论(0) 推荐(0) 编辑
摘要: 一.读写数据1.读数据 #使用open打开文件后一定要记得调用文件对象的close()方法。比如可以用try/finally语句来确保最后能关闭文件。file_object = open('thefile.txt') try: all_the_text = file_object.read( ) finally: file_object.close( )#注:不能把open语... 阅读全文
posted @ 2017-12-21 12:17 程序生(Codey) 阅读(1214) 评论(0) 推荐(0) 编辑
摘要: 解决python同目录报错:import util 改成 from . import util 阅读全文
posted @ 2017-12-21 10:18 程序生(Codey) 阅读(129) 评论(0) 推荐(0) 编辑