Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
211643b6
Commit
211643b6
authored
Mar 26, 2011
by
Éric Araujo
Browse files
Options
Browse Files
Download
Plain Diff
Branch merge
parents
946f1721
f84eb5a3
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
31 deletions
+18
-31
Doc/library/http.cookiejar.rst
Doc/library/http.cookiejar.rst
+1
-1
Doc/library/readline.rst
Doc/library/readline.rst
+1
-1
Doc/library/sys.rst
Doc/library/sys.rst
+15
-25
Doc/tutorial/interactive.rst
Doc/tutorial/interactive.rst
+1
-4
No files found.
Doc/library/http.cookiejar.rst
View file @
211643b6
...
...
@@ -719,7 +719,7 @@ cookies (assumes Unix/Netscape convention for location of the cookies file)::
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/")
...
...
Doc/library/readline.rst
View file @
211643b6
...
...
@@ -197,7 +197,7 @@ normally be executed automatically during interactive sessions from the user's
import os
import readline
histfile = os.path.join(os.
environ["HOME"]
, ".pyhist")
histfile = os.path.join(os.
path.expanduser("~")
, ".pyhist")
try:
readline.read_history_file(histfile)
except IOError:
...
...
Doc/library/sys.rst
View file @
211643b6
...
...
@@ -206,31 +206,21 @@ always available.
The struct sequence *flags* exposes the status of command line flags. The
attributes are read only.
+------------------------------+------------------------------------------+
| attribute | flag |
+==============================+==========================================+
| :const:`debug` | -d |
+------------------------------+------------------------------------------+
| :const:`division_warning` | -Q |
+------------------------------+------------------------------------------+
| :const:`inspect` | -i |
+------------------------------+------------------------------------------+
| :const:`interactive` | -i |
+------------------------------+------------------------------------------+
| :const:`optimize` | -O or -OO |
+------------------------------+------------------------------------------+
| :const:`dont_write_bytecode` | -B |
+------------------------------+------------------------------------------+
| :const:`no_user_site` | -s |
+------------------------------+------------------------------------------+
| :const:`no_site` | -S |
+------------------------------+------------------------------------------+
| :const:`ignore_environment` | -E |
+------------------------------+------------------------------------------+
| :const:`verbose` | -v |
+------------------------------+------------------------------------------+
| :const:`bytes_warning` | -b |
+------------------------------+------------------------------------------+
============================= =============================
attribute flag
============================= =============================
:const:`debug` :option:`-d`
:const:`division_warning` :option:`-Q`
:const:`inspect` :option:`-i`
:const:`interactive` :option:`-i`
:const:`optimize` :option:`-O` or :option:`-OO`
:const:`dont_write_bytecode` :option:`-B`
:const:`no_user_site` :option:`-s`
:const:`no_site` :option:`-S`
:const:`ignore_environment` :option:`-E`
:const:`verbose` :option:`-v`
:const:`bytes_warning` :option:`-b`
============================= =============================
.. data:: float_info
...
...
Doc/tutorial/interactive.rst
View file @
211643b6
...
...
@@ -123,10 +123,7 @@ interpreter. ::
# bound to the Esc key by default (you can change it - see readline docs).
#
# Store the file in ~/.pystartup, and set an environment variable to point
# to it: "export PYTHONSTARTUP=/home/user/.pystartup" in bash.
#
# Note that PYTHONSTARTUP does *not* expand "~", so you have to put in the
# full path to your home directory.
# to it: "export PYTHONSTARTUP=~/.pystartup" in bash.
import atexit
import os
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment