01 2011 档案

摘要:转自 http://my.oschina.net/captaintheron/blog/8898下面,本文就将结合具体的例子来说明怎样利用curl进行下载。 1、获得一张页面 使用命令:curl http://curl.haxx.se 这是最简单的使用方法。用这个命令获得了http:/... 阅读全文
posted @ 2011-01-19 14:27 阿债 阅读(172) 评论(0) 推荐(0)
摘要:#! /usr/bin/python# -*- coding: utf-8 -*-def check_id_num(id_num): assert len(id_num) == 18 and id_num[:17].isdigit() factors = [7, 9, 10, 5... 阅读全文
posted @ 2011-01-15 17:57 阿债 阅读(179) 评论(0) 推荐(0)
摘要:#! /usr/bin/python# -*- coding: utf-8 -*-def get_constellation(ymd="2000-01-01"): stellates = [ {'date':120, 'name':u'水瓶座'}, {'da... 阅读全文
posted @ 2011-01-15 17:55 阿债 阅读(152) 评论(0) 推荐(0)
摘要:设置python运行环境的编码参考这里 http://diveintopython.org/xml_processing/unicode.html《Dive Into Python》 的 Example 9.15. sitecustomize.py# sitecustomize.py #... 阅读全文
posted @ 2011-01-15 17:54 阿债 阅读(150) 评论(0) 推荐(0)
摘要:不是代码出的问题,是*.pyc文件被改动了。解决方法,删除所有*.pyc文件再运行 阅读全文
posted @ 2011-01-11 14:53 阿债 阅读(2203) 评论(0) 推荐(0)