diff options
author | Éric Araujo <merwok@netwok.org> | 2011-03-25 19:31:50 (GMT) |
---|---|---|
committer | Éric Araujo <merwok@netwok.org> | 2011-03-25 19:31:50 (GMT) |
commit | 4dcf50250c24748b4a49bc4482752eb382d663ee (patch) | |
tree | 5c7fd93966ed660b5f7b8837cf22440226f07b0b /Doc/library/http.cookiejar.rst | |
parent | ebbf1e67a8c56a79ee62280d32517e77b103bf8e (diff) | |
download | cpython-4dcf50250c24748b4a49bc4482752eb382d663ee.zip cpython-4dcf50250c24748b4a49bc4482752eb382d663ee.tar.gz cpython-4dcf50250c24748b4a49bc4482752eb382d663ee.tar.bz2 |
Use universal construct os.path.expanduser('~') instead of os.environ['HOME']
Diffstat (limited to 'Doc/library/http.cookiejar.rst')
-rw-r--r-- | Doc/library/http.cookiejar.rst | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Doc/library/http.cookiejar.rst b/Doc/library/http.cookiejar.rst index 1aafec9..74d8d16 100644 --- a/Doc/library/http.cookiejar.rst +++ b/Doc/library/http.cookiejar.rst @@ -719,7 +719,7 @@ cookies (assumes Unix/Netscape convention for location of the cookies file):: import os, http.cookiejar, urllib.request cj = http.cookiejar.MozillaCookieJar() - cj.load(os.path.join(os.environ["HOME"], ".netscape/cookies.txt")) + cj.load(os.path.join(os.path.expanduser("~"), ".netscape", "cookies.txt")) opener = urllib.request.build_opener(urllib.request.HTTPCookieProcessor(cj)) r = opener.open("http://example.com/") |