File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -719,7 +719,7 @@ cookies (assumes Unix/Netscape convention for location of the cookies file)::
719719
720720 import os, http.cookiejar, urllib.request
721721 cj = http.cookiejar.MozillaCookieJar()
722- cj.load(os.path.join(os.environ["HOME"] , ".netscape/ cookies.txt"))
722+ cj.load(os.path.join(os.path.expanduser("~") , ".netscape", " cookies.txt"))
723723 opener = urllib.request.build_opener(urllib.request.HTTPCookieProcessor(cj))
724724 r = opener.open("http://example.com/")
725725
Original file line number Diff line number Diff line change @@ -197,7 +197,7 @@ normally be executed automatically during interactive sessions from the user's
197197
198198 import os
199199 import readline
200- histfile = os.path.join(os.environ["HOME"] , ".pyhist")
200+ histfile = os.path.join(os.path.expanduser("~") , ".pyhist")
201201 try:
202202 readline.read_history_file(histfile)
203203 except IOError:
You can’t perform that action at this time.
0 commit comments