![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Python
kuluzs
这个作者很懒,什么都没留下…
展开
-
python自身bug:file.tell()在Linux和window平台下返回不同的值
1)问题:2)分析: 可以看到 window下和Linux下,file.tell()返回的值居然不同。 奇怪!3)google之,得到结论: 参考:http://stackoverflow.com/questions/15934950/python-file-tell-giving-strange-numbers 相关解释:原创 2016-06-06 21:24:57 · 1017 阅读 · 0 评论 -
Python操作json用法及json示例
【python import json 用法】 json.loads : 将python字符串 转换为 python字典/列表 json.dumps : 将python字典/列表 转换为 python字符串## 代码示例:def write_json(): a = { "type" : "text", "na原创 2016-11-03 15:40:38 · 8181 阅读 · 0 评论 -
Python构造发送POST请求
代码示例如下:def post(): url = "http://127.0.0.1:8000/login.jsp" postDict = { 'username' : 'test', 'password' : '123', 'login' : '登录' } opener = urllib2.build_o原创 2016-11-03 15:51:41 · 4323 阅读 · 0 评论