Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1c5df5d

Browse files
committed
Merge doc touchups from 3.1
2 parents 1103d05 + f84eb5a commit 1c5df5d

4 files changed

Lines changed: 19 additions & 33 deletions

File tree

Doc/library/http.cookiejar.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -722,7 +722,7 @@ cookies (assumes Unix/Netscape convention for location of the cookies file)::
722722

723723
import os, http.cookiejar, urllib.request
724724
cj = http.cookiejar.MozillaCookieJar()
725-
cj.load(os.path.join(os.environ["HOME"], ".netscape/cookies.txt"))
725+
cj.load(os.path.join(os.path.expanduser("~"), ".netscape", "cookies.txt"))
726726
opener = urllib.request.build_opener(urllib.request.HTTPCookieProcessor(cj))
727727
r = opener.open("http://example.com/")
728728

Doc/library/readline.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ normally be executed automatically during interactive sessions from the user's
196196

197197
import os
198198
import readline
199-
histfile = os.path.join(os.environ["HOME"], ".pyhist")
199+
histfile = os.path.join(os.path.expanduser("~"), ".pyhist")
200200
try:
201201
readline.read_history_file(histfile)
202202
except IOError:

Doc/library/sys.rst

Lines changed: 16 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -239,33 +239,22 @@ always available.
239239
The struct sequence *flags* exposes the status of command line flags. The
240240
attributes are read only.
241241

242-
+------------------------------+------------------------------------------+
243-
| attribute | flag |
244-
+==============================+==========================================+
245-
| :const:`debug` | -d |
246-
+------------------------------+------------------------------------------+
247-
| :const:`division_warning` | -Q |
248-
+------------------------------+------------------------------------------+
249-
| :const:`inspect` | -i |
250-
+------------------------------+------------------------------------------+
251-
| :const:`interactive` | -i |
252-
+------------------------------+------------------------------------------+
253-
| :const:`optimize` | -O or -OO |
254-
+------------------------------+------------------------------------------+
255-
| :const:`dont_write_bytecode` | -B |
256-
+------------------------------+------------------------------------------+
257-
| :const:`no_user_site` | -s |
258-
+------------------------------+------------------------------------------+
259-
| :const:`no_site` | -S |
260-
+------------------------------+------------------------------------------+
261-
| :const:`ignore_environment` | -E |
262-
+------------------------------+------------------------------------------+
263-
| :const:`verbose` | -v |
264-
+------------------------------+------------------------------------------+
265-
| :const:`bytes_warning` | -b |
266-
+------------------------------+------------------------------------------+
267-
| :const:`quiet` | -q |
268-
+------------------------------+------------------------------------------+
242+
============================= =============================
243+
attribute flag
244+
============================= =============================
245+
:const:`debug` :option:`-d`
246+
:const:`division_warning` :option:`-Q`
247+
:const:`inspect` :option:`-i`
248+
:const:`interactive` :option:`-i`
249+
:const:`optimize` :option:`-O` or :option:`-OO`
250+
:const:`dont_write_bytecode` :option:`-B`
251+
:const:`no_user_site` :option:`-s`
252+
:const:`no_site` :option:`-S`
253+
:const:`ignore_environment` :option:`-E`
254+
:const:`verbose` :option:`-v`
255+
:const:`bytes_warning` :option:`-b`
256+
:const:`quiet` :option:`-q`
257+
============================= =============================
269258

270259
.. versionchanged:: 3.2
271260
Added ``quiet`` attribute for the new :option:`-q` flag.

Doc/tutorial/interactive.rst

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,10 +123,7 @@ interpreter. ::
123123
# bound to the Esc key by default (you can change it - see readline docs).
124124
#
125125
# Store the file in ~/.pystartup, and set an environment variable to point
126-
# to it: "export PYTHONSTARTUP=/home/user/.pystartup" in bash.
127-
#
128-
# Note that PYTHONSTARTUP does *not* expand "~", so you have to put in the
129-
# full path to your home directory.
126+
# to it: "export PYTHONSTARTUP=~/.pystartup" in bash.
130127

131128
import atexit
132129
import os

0 commit comments

Comments
 (0)