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
83c18b49
Commit
83c18b49
authored
May 13, 2012
by
Ezio Melotti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#14770: backport a couple of changes from 3.x.
parent
fe84efea
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
13 deletions
+9
-13
Doc/faq/library.rst
Doc/faq/library.rst
+9
-13
No files found.
Doc/faq/library.rst
View file @
83c18b49
...
...
@@ -91,7 +91,7 @@ Is there a curses/termcap package for Python?
.. XXX curses *is* built by default, isn't it?
For Unix variants
: T
he standard Python source distribution comes with a curses
For Unix variants
t
he standard Python source distribution comes with a curses
module in the :source:`Modules` subdirectory, though it's not compiled by default.
(Note that this is not available in the Windows distribution -- there is no
curses module for Windows.)
...
...
@@ -352,7 +352,7 @@ class provides a featureful interface.
What kinds of global value mutation are thread-safe?
----------------------------------------------------
A
global interpreter lock (:term:`GIL`
) is used internally to ensure that only
A
:term:`global interpreter lock` (GIL
) is used internally to ensure that only
one thread runs in the Python VM at a time. In general, Python offers to switch
among threads only between bytecode instructions; how frequently it switches can
be set via :func:`sys.setcheckinterval`. Each bytecode instruction and
...
...
@@ -398,7 +398,7 @@ Can't we get rid of the Global Interpreter Lock?
.. XXX mention multiprocessing
.. XXX link to dbeazley's talk about GIL?
The
Global Interpreter Lock (:term:`GIL`
) is often seen as a hindrance to Python's
The
:term:`global interpreter lock` (GIL
) is often seen as a hindrance to Python's
deployment on high-end multiprocessor server machines, because a multi-threaded
Python program effectively only uses one CPU, due to the insistence that
(almost) all Python code can only run while the GIL is held.
...
...
@@ -675,16 +675,12 @@ Yes. Here's a simple example that uses httplib::
sys.stdout.write(httpobj.getfile().read())
Note that in general for percent-encoded POST operations, query strings must be
quoted using :func:`urllib.quote`. For example, to send
``name="Guy Steele, Jr."``::
>>> from urllib import quote
>>> x = quote("Guy Steele, Jr.")
>>> x
'Guy%20Steele,%20Jr.'
>>> query_string = "name="+x
>>> query_string
'name=Guy%20Steele,%20Jr.'
quoted using :func:`urllib.urlencode`. For example, to send
``name=Guy Steele, Jr.``::
>>> import urllib
>>> urllib.urlencode({'name': 'Guy Steele, Jr.'})
'name=Guy+Steele%2C+Jr.'
What module should I use to help with generating HTML?
...
...
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