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

Skip to content

Commit f84eb5a

Browse files
committed
Branch merge
2 parents b9a428d + 5ab4776 commit f84eb5a

4 files changed

Lines changed: 18 additions & 31 deletions

File tree

Doc/library/http.cookiejar.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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

Doc/library/readline.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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:

Doc/library/sys.rst

Lines changed: 15 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -206,31 +206,21 @@ always available.
206206
The struct sequence *flags* exposes the status of command line flags. The
207207
attributes are read only.
208208

209-
+------------------------------+------------------------------------------+
210-
| attribute | flag |
211-
+==============================+==========================================+
212-
| :const:`debug` | -d |
213-
+------------------------------+------------------------------------------+
214-
| :const:`division_warning` | -Q |
215-
+------------------------------+------------------------------------------+
216-
| :const:`inspect` | -i |
217-
+------------------------------+------------------------------------------+
218-
| :const:`interactive` | -i |
219-
+------------------------------+------------------------------------------+
220-
| :const:`optimize` | -O or -OO |
221-
+------------------------------+------------------------------------------+
222-
| :const:`dont_write_bytecode` | -B |
223-
+------------------------------+------------------------------------------+
224-
| :const:`no_user_site` | -s |
225-
+------------------------------+------------------------------------------+
226-
| :const:`no_site` | -S |
227-
+------------------------------+------------------------------------------+
228-
| :const:`ignore_environment` | -E |
229-
+------------------------------+------------------------------------------+
230-
| :const:`verbose` | -v |
231-
+------------------------------+------------------------------------------+
232-
| :const:`bytes_warning` | -b |
233-
+------------------------------+------------------------------------------+
209+
============================= =============================
210+
attribute flag
211+
============================= =============================
212+
:const:`debug` :option:`-d`
213+
:const:`division_warning` :option:`-Q`
214+
:const:`inspect` :option:`-i`
215+
:const:`interactive` :option:`-i`
216+
:const:`optimize` :option:`-O` or :option:`-OO`
217+
:const:`dont_write_bytecode` :option:`-B`
218+
:const:`no_user_site` :option:`-s`
219+
:const:`no_site` :option:`-S`
220+
:const:`ignore_environment` :option:`-E`
221+
:const:`verbose` :option:`-v`
222+
:const:`bytes_warning` :option:`-b`
223+
============================= =============================
234224

235225

236226
.. data:: float_info

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)