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

Skip to content

Commit 5c1da90

Browse files
committed
Merge 3.2
2 parents 4e4edf5 + b39b196 commit 5c1da90

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
@@ -227,33 +227,22 @@ always available.
227227
The struct sequence *flags* exposes the status of command line flags. The
228228
attributes are read only.
229229

230-
+------------------------------+------------------------------------------+
231-
| attribute | flag |
232-
+==============================+==========================================+
233-
| :const:`debug` | -d |
234-
+------------------------------+------------------------------------------+
235-
| :const:`division_warning` | -Q |
236-
+------------------------------+------------------------------------------+
237-
| :const:`inspect` | -i |
238-
+------------------------------+------------------------------------------+
239-
| :const:`interactive` | -i |
240-
+------------------------------+------------------------------------------+
241-
| :const:`optimize` | -O or -OO |
242-
+------------------------------+------------------------------------------+
243-
| :const:`dont_write_bytecode` | -B |
244-
+------------------------------+------------------------------------------+
245-
| :const:`no_user_site` | -s |
246-
+------------------------------+------------------------------------------+
247-
| :const:`no_site` | -S |
248-
+------------------------------+------------------------------------------+
249-
| :const:`ignore_environment` | -E |
250-
+------------------------------+------------------------------------------+
251-
| :const:`verbose` | -v |
252-
+------------------------------+------------------------------------------+
253-
| :const:`bytes_warning` | -b |
254-
+------------------------------+------------------------------------------+
255-
| :const:`quiet` | -q |
256-
+------------------------------+------------------------------------------+
230+
============================= =============================
231+
attribute flag
232+
============================= =============================
233+
:const:`debug` :option:`-d`
234+
:const:`division_warning` :option:`-Q`
235+
:const:`inspect` :option:`-i`
236+
:const:`interactive` :option:`-i`
237+
:const:`optimize` :option:`-O` or :option:`-OO`
238+
:const:`dont_write_bytecode` :option:`-B`
239+
:const:`no_user_site` :option:`-s`
240+
:const:`no_site` :option:`-S`
241+
:const:`ignore_environment` :option:`-E`
242+
:const:`verbose` :option:`-v`
243+
:const:`bytes_warning` :option:`-b`
244+
:const:`quiet` :option:`-q`
245+
============================= =============================
257246

258247
.. versionchanged:: 3.2
259248
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)