forked from qiwsir/StarterLearningPython
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request qiwsir#108 from zen-young-chan/patch-5
Update 225.md
- Loading branch information
Showing
1 changed file
with
2 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -219,7 +219,7 @@ urllib2是另外一个模块,它跟urllib有相似的地方——都是对url | |
>>> dir(urllib2) | ||
['AbstractBasicAuthHandler', 'AbstractDigestAuthHandler', 'AbstractHTTPHandler', 'BaseHandler', 'CacheFTPHandler', 'FTPHandler', 'FileHandler', 'HTTPBasicAuthHandler', 'HTTPCookieProcessor', 'HTTPDefaultErrorHandler', 'HTTPDigestAuthHandler', 'HTTPError', 'HTTPErrorProcessor', 'HTTPHandler', 'HTTPPasswordMgr', 'HTTPPasswordMgrWithDefaultRealm', 'HTTPRedirectHandler', 'HTTPSHandler', 'OpenerDirector', 'ProxyBasicAuthHandler', 'ProxyDigestAuthHandler', 'ProxyHandler', 'Request', 'StringIO', 'URLError', 'UnknownHandler', '__builtins__', '__doc__', '__file__', '__name__', '__package__', '__version__', '_cut_port_re', '_opener', '_parse_proxy', '_safe_gethostbyname', 'addinfourl', 'base64', 'bisect', 'build_opener', 'ftpwrapper', 'getproxies', 'hashlib', 'httplib', 'install_opener', 'localhost', 'mimetools', 'os', 'parse_http_list', 'parse_keqv_list', 'posixpath', 'proxy_bypass', 'quote', 'random', 'randombytes', 're', 'request_host', 'socket', 'splitattr', 'splithost', 'splitpasswd', 'splitport', 'splittag', 'splittype', 'splituser', 'splitvalue', 'sys', 'time', 'toBytes', 'unquote', 'unwrap', 'url2pathname', 'urlopen', 'urlparse', 'warnings'] | ||
|
||
比较常用的比如`urlopen()`跟`urllib.open()`是完全类似的。 | ||
比较常用的比如`urlopen()`跟`urllib.urlopen()`是完全类似的。 | ||
|
||
但是,要注意,上述言论仅仅是针对Python 2的,在Python 3中,已经没有`urllib2`这个模块了,取代它的是`urllib.request`。 | ||
|
||
|
@@ -309,4 +309,4 @@ Python 3: | |
|
||
[总目录](./index.md) | [上节:标准库(5)](./224.md) | [下节:标准库(7)](./226.md) | ||
|
||
如果你认为有必要打赏我,请通过支付宝:**[email protected]**,不胜感激。 | ||
如果你认为有必要打赏我,请通过支付宝:**[email protected]**,不胜感激。 |