摘要: 在Python HOWTO里面介绍了什么时候去用这个模块。我觉得就是你想用的时候就行(废话嘛。。。。。)(例子来源于Python HOWTO)1、basicConfiglogging.basicConfig(filename='example.log',level=logging.DEBUG)logging.debug('This message should go to the log file')logging.info('So should this')logging.warning('And this, too')basi 阅读全文
posted @ 2014-02-28 21:04 Hacker_MJW 阅读(286) 评论(0) 推荐(0) 编辑
摘要: #!/usr/bin/python# coding: utf-8## filename: pachong of doubban# # author: Hacker_MJW## Date: 2014-02-28#import urllibimport urllib2import loggingimport osimport reimport timeclass SuperReptile(object): ''' 爬虫的超级类,用作继承用 ''' def __init__(self, init_url, pro_name): self.init_u. 阅读全文
posted @ 2014-02-28 20:10 Hacker_MJW 阅读(283) 评论(0) 推荐(0) 编辑