Changeset 391 for python/trunk/Doc/library/cookielib.rst
- Timestamp:
- Mar 19, 2014, 11:31:01 PM (11 years ago)
- Location:
- python/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
python/trunk
-
Property svn:mergeinfo
set to
/python/vendor/Python-2.7.6 merged eligible /python/vendor/current merged eligible
-
Property svn:mergeinfo
set to
-
python/trunk/Doc/library/cookielib.rst
r2 r391 9 9 .. note:: 10 10 The :mod:`cookielib` module has been renamed to :mod:`http.cookiejar` in 11 Python 3.0. The :term:`2to3` tool will automatically adapt imports when 12 converting your sources to 3.0. 13 11 Python 3. The :term:`2to3` tool will automatically adapt imports when 12 converting your sources to Python 3. 14 13 15 14 .. versionadded:: 2.4 16 15 17 16 **Source code:** :source:`Lib/cookielib.py` 17 18 -------------- 18 19 19 20 The :mod:`cookielib` module defines classes for automatic handling of HTTP … … 122 123 :mod:`cookielib` and :mod:`Cookie` modules do not depend on each other. 123 124 124 http://wwwsearch.sf.net/ClientCookie/125 Extensions to this module, including a class for reading Microsoft Internet126 Explorer cookies on Windows.127 128 125 http://wp.netscape.com/newsref/std/cookie_spec.html 129 126 The specification of the original Netscape cookie protocol. Though this is … … 311 308 ----------------------------------------------------------- 312 309 313 The following :class:`CookieJar` subclasses are provided for reading and writing 314 . Further :class:`CookieJar` subclasses, including one that reads Microsoft 315 Internet Explorer cookies, are available at 316 http://wwwsearch.sf.net/ClientCookie/. 317 310 The following :class:`CookieJar` subclasses are provided for reading and 311 writing . 318 312 319 313 .. class:: MozillaCookieJar(filename, delayload=None, policy=None) … … 758 752 import os, cookielib, urllib2 759 753 cj = cookielib.MozillaCookieJar() 760 cj.load(os.path.join(os. environ["HOME"], ".netscape/cookies.txt"))754 cj.load(os.path.join(os.path.expanduser("~"), ".netscape", "cookies.txt")) 761 755 opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cj)) 762 756 r = opener.open("http://example.com/")
Note:
See TracChangeset
for help on using the changeset viewer.