Ignore:
Timestamp:
Mar 19, 2014, 11:31:01 PM (11 years ago)
Author:
dmik
Message:

python: Merge vendor 2.7.6 to trunk.

Location:
python/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • python/trunk

  • python/trunk/Doc/library/cookielib.rst

    r2 r391  
    99.. note::
    1010   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.
    1413
    1514.. versionadded:: 2.4
    1615
    17 
     16**Source code:** :source:`Lib/cookielib.py`
     17
     18--------------
    1819
    1920The :mod:`cookielib` module defines classes for automatic handling of HTTP
     
    122123      :mod:`cookielib` and :mod:`Cookie` modules do not depend on each other.
    123124
    124    http://wwwsearch.sf.net/ClientCookie/
    125       Extensions to this module, including a class for reading Microsoft Internet
    126       Explorer cookies on Windows.
    127 
    128125   http://wp.netscape.com/newsref/std/cookie_spec.html
    129126      The specification of the original Netscape cookie protocol.  Though this is
     
    311308-----------------------------------------------------------
    312309
    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 
     310The following :class:`CookieJar` subclasses are provided for reading and
     311writing .
    318312
    319313.. class:: MozillaCookieJar(filename, delayload=None, policy=None)
     
    758752   import os, cookielib, urllib2
    759753   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"))
    761755   opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cj))
    762756   r = opener.open("http://example.com/")
Note: See TracChangeset for help on using the changeset viewer.