Use universal construct os.path.expanduser('~') instead of os.environ['HOME']
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 @@
 
    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/")