
第13页

2016
09-12
09-12
Python中的__init__,__call__ NEW
__init__函数当一个类实例被创建时, __init__() 方法会自动执行,在类实例创建完毕后执行,类似构建函数。__init__() 可以被当成构建函数,不过不象其它语言中的构建函数,它并不创建实例--它仅仅是你的对象创建后执行的第一个方法。它的目的是执行一些该对象的必要的初始 化工作。通过创建自己的 __init__() 方法,你可以覆盖默认的 __init__()方法(默认的方法什么也不做),从而能够修饰刚刚创建的对象__init__()需要一个默认的参数self...
Read More >
2016
09-12
09-12
Python爬虫模拟登录带验证码网站 NEW

2016
09-12
09-12
Python访问网站获得cookie,使用cookie访问网站

2016
09-10
09-10
urllib2自定义opener详解及其实例应用

2016
09-10
09-10
Python实现自动登录网页后采集信息

2016
09-10
09-10
Python的装饰器用法

getattr()函数是Python自省的核心函数,具体使用大体如下:获取对象引用getattrGetattr用于返回一个对象属性,或者方法class A:
def __init__(self):
self.name ...
Read More >
2016
09-08
09-08
Python sqlite3 模块 API及增删改查示例

2016
09-08
09-08
Python中MYSQLdb的基本用法:数据库增删改查
