Line | |
---|
1 | # urllib2 work-alike interface
|
---|
2 | # ...from urllib2...
|
---|
3 | from urllib2 import \
|
---|
4 | URLError, \
|
---|
5 | HTTPError, \
|
---|
6 | BaseHandler, \
|
---|
7 | UnknownHandler, \
|
---|
8 | FTPHandler, \
|
---|
9 | CacheFTPHandler
|
---|
10 | # ...and from mechanize
|
---|
11 | from _auth import \
|
---|
12 | HTTPPasswordMgr, \
|
---|
13 | HTTPPasswordMgrWithDefaultRealm, \
|
---|
14 | AbstractBasicAuthHandler, \
|
---|
15 | AbstractDigestAuthHandler, \
|
---|
16 | HTTPProxyPasswordMgr, \
|
---|
17 | ProxyHandler, \
|
---|
18 | ProxyBasicAuthHandler, \
|
---|
19 | ProxyDigestAuthHandler, \
|
---|
20 | HTTPBasicAuthHandler, \
|
---|
21 | HTTPDigestAuthHandler, \
|
---|
22 | HTTPSClientCertMgr
|
---|
23 | from _debug import \
|
---|
24 | HTTPResponseDebugProcessor, \
|
---|
25 | HTTPRedirectDebugProcessor
|
---|
26 | from _file import \
|
---|
27 | FileHandler
|
---|
28 | # crap ATM
|
---|
29 | ## from _gzip import \
|
---|
30 | ## HTTPGzipProcessor
|
---|
31 | from _http import \
|
---|
32 | HTTPHandler, \
|
---|
33 | HTTPDefaultErrorHandler, \
|
---|
34 | HTTPRedirectHandler, \
|
---|
35 | HTTPEquivProcessor, \
|
---|
36 | HTTPCookieProcessor, \
|
---|
37 | HTTPRefererProcessor, \
|
---|
38 | HTTPRefreshProcessor, \
|
---|
39 | HTTPErrorProcessor, \
|
---|
40 | HTTPRobotRulesProcessor, \
|
---|
41 | RobotExclusionError
|
---|
42 | import httplib
|
---|
43 | if hasattr(httplib, 'HTTPS'):
|
---|
44 | from _http import HTTPSHandler
|
---|
45 | del httplib
|
---|
46 | from _opener import OpenerDirector, \
|
---|
47 | SeekableResponseOpener, \
|
---|
48 | build_opener, install_opener, urlopen
|
---|
49 | from _request import \
|
---|
50 | Request
|
---|
51 | from _seek import \
|
---|
52 | SeekableProcessor
|
---|
53 | from _upgrade import \
|
---|
54 | HTTPRequestUpgradeProcessor, \
|
---|
55 | ResponseUpgradeProcessor
|
---|
Note:
See
TracBrowser
for help on using the repository browser.