Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit d46a42f

Browse filesBrowse files
authored
faq/library: remove outdated section (#105996)
1 parent e2ec0ba commit d46a42f
Copy full SHA for d46a42f

File tree

Expand file treeCollapse file tree

1 file changed

+0
-35
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+0
-35
lines changed

‎Doc/faq/library.rst

Copy file name to clipboardExpand all lines: Doc/faq/library.rst
-35Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -669,41 +669,6 @@ and client-side web systems.
669669
A summary of available frameworks is maintained by Paul Boddie at
670670
https://wiki.python.org/moin/WebProgramming\ .
671671
672-
Cameron Laird maintains a useful set of pages about Python web technologies at
673-
https://web.archive.org/web/20210224183619/http://phaseit.net/claird/comp.lang.python/web_python.
674-
675-
676-
How can I mimic CGI form submission (METHOD=POST)?
677-
--------------------------------------------------
678-
679-
I would like to retrieve web pages that are the result of POSTing a form. Is
680-
there existing code that would let me do this easily?
681-
682-
Yes. Here's a simple example that uses :mod:`urllib.request`::
683-
684-
#!/usr/local/bin/python
685-
686-
import urllib.request
687-
688-
# build the query string
689-
qs = "First=Josephine&MI=Q&Last=Public"
690-
691-
# connect and send the server a path
692-
req = urllib.request.urlopen('http://www.some-server.out-there'
693-
'/cgi-bin/some-cgi-script', data=qs)
694-
with req:
695-
msg, hdrs = req.read(), req.info()
696-
697-
Note that in general for percent-encoded POST operations, query strings must be
698-
quoted using :func:`urllib.parse.urlencode`. For example, to send
699-
``name=Guy Steele, Jr.``::
700-
701-
>>> import urllib.parse
702-
>>> urllib.parse.urlencode({'name': 'Guy Steele, Jr.'})
703-
'name=Guy+Steele%2C+Jr.'
704-
705-
.. seealso:: :ref:`urllib-howto` for extensive examples.
706-
707672
708673
What module should I use to help with generating HTML?
709674
------------------------------------------------------

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.