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
a2e268aa
Commit
a2e268aa
authored
Dec 09, 1997
by
Fred Drake
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Mark file names with \file{} instead of \code{}.
parent
41999c16
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
18 deletions
+20
-18
Doc/lib/libcgi.tex
Doc/lib/libcgi.tex
+10
-9
Doc/libcgi.tex
Doc/libcgi.tex
+10
-9
No files found.
Doc/lib/libcgi.tex
View file @
a2e268aa
...
...
@@ -20,7 +20,7 @@ written in Python.
A CGI script is invoked by an HTTP server, usually to process user
input submitted through an HTML
\code
{
<FORM>
}
or
\code
{
<ISINPUT>
}
element.
Most often, CGI scripts live in the server's special
\
cod
e
{
cgi-bin
}
Most often, CGI scripts live in the server's special
\
fil
e
{
cgi-bin
}
directory. The HTTP server places all sorts of information about the
request (such as the client's hostname, the requested URL, the query
string, and lots of other goodies) in the script's shell environment,
...
...
@@ -28,7 +28,7 @@ executes the script, and sends the script's output back to the client.
The script's input is connected to the client too, and sometimes the
form data is read this way; at other times the form data is passed via
the ``query string'' part of the URL. This module (
\
cod
e
{
cgi.py
}
) is intended
the ``query string'' part of the URL. This module (
\
fil
e
{
cgi.py
}
) is intended
to take care of the different cases and provide a simpler interface to
the Python script. It also provides a number of utilities that help
in debugging scripts, and the latest addition is support for file
...
...
@@ -260,7 +260,7 @@ alphanumeric characters, dashes, underscores, and periods.
Read the documentation for your HTTP server and check with your local
system administrator to find the directory where CGI scripts should be
installed; usually this is in a directory
\
cod
e
{
cgi-bin
}
in the server tree.
installed; usually this is in a directory
\
fil
e
{
cgi-bin
}
in the server tree.
Make sure that your script is readable and executable by ``others''; the
Unix file mode should be 755 (use
\code
{
chmod 755 filename
}
). Make sure
...
...
@@ -321,10 +321,10 @@ First of all, check for trivial installation errors -- reading the
section above on installing your CGI script carefully can save you a
lot of time. If you wonder whether you have understood the
installation procedure correctly, try installing a copy of this module
file (
\
cod
e
{
cgi.py
}
) as a CGI script. When invoked as a script, the file
file (
\
fil
e
{
cgi.py
}
) as a CGI script. When invoked as a script, the file
will dump its environment and the contents of the form in HTML form.
Give it the right mode etc, and send it a request. If it's installed
in the standard
\
cod
e
{
cgi-bin
}
directory, it should be possible to send it a
in the standard
\
fil
e
{
cgi-bin
}
directory, it should be possible to send it a
request by entering a URL into your browser of the form:
\bcode
\begin{verbatim}
...
...
@@ -337,19 +337,20 @@ gives another error (e.g. 500), there's an installation problem that
you should fix before trying to go any further. If you get a nicely
formatted listing of the environment and form content (in this
example, the fields should be listed as ``addr'' with value ``At Home''
and ``name'' with value ``Joe Blow''), the
\
cod
e
{
cgi.py
}
script has been
and ``name'' with value ``Joe Blow''), the
\
fil
e
{
cgi.py
}
script has been
installed correctly. If you follow the same procedure for your own
script, you should now be able to debug it.
The next step could be to call the
\code
{
cgi
}
module's test() function from
your script: replace its main code with the single statement
The next step could be to call the
\code
{
cgi
}
module's
\code
{
test()
}
function from your script: replace its main code with the single
statement
\bcode
\begin{verbatim}
cgi.test()
\end{verbatim}
\ecode
%
This should produce the same results as those gotten from installing
the
\
cod
e
{
cgi.py
}
file itself.
the
\
fil
e
{
cgi.py
}
file itself.
When an ordinary Python script raises an unhandled exception
(e.g. because of a typo in a module name, a file that can't be opened,
...
...
Doc/libcgi.tex
View file @
a2e268aa
...
...
@@ -20,7 +20,7 @@ written in Python.
A CGI script is invoked by an HTTP server, usually to process user
input submitted through an HTML
\code
{
<FORM>
}
or
\code
{
<ISINPUT>
}
element.
Most often, CGI scripts live in the server's special
\
cod
e
{
cgi-bin
}
Most often, CGI scripts live in the server's special
\
fil
e
{
cgi-bin
}
directory. The HTTP server places all sorts of information about the
request (such as the client's hostname, the requested URL, the query
string, and lots of other goodies) in the script's shell environment,
...
...
@@ -28,7 +28,7 @@ executes the script, and sends the script's output back to the client.
The script's input is connected to the client too, and sometimes the
form data is read this way; at other times the form data is passed via
the ``query string'' part of the URL. This module (
\
cod
e
{
cgi.py
}
) is intended
the ``query string'' part of the URL. This module (
\
fil
e
{
cgi.py
}
) is intended
to take care of the different cases and provide a simpler interface to
the Python script. It also provides a number of utilities that help
in debugging scripts, and the latest addition is support for file
...
...
@@ -260,7 +260,7 @@ alphanumeric characters, dashes, underscores, and periods.
Read the documentation for your HTTP server and check with your local
system administrator to find the directory where CGI scripts should be
installed; usually this is in a directory
\
cod
e
{
cgi-bin
}
in the server tree.
installed; usually this is in a directory
\
fil
e
{
cgi-bin
}
in the server tree.
Make sure that your script is readable and executable by ``others''; the
Unix file mode should be 755 (use
\code
{
chmod 755 filename
}
). Make sure
...
...
@@ -321,10 +321,10 @@ First of all, check for trivial installation errors -- reading the
section above on installing your CGI script carefully can save you a
lot of time. If you wonder whether you have understood the
installation procedure correctly, try installing a copy of this module
file (
\
cod
e
{
cgi.py
}
) as a CGI script. When invoked as a script, the file
file (
\
fil
e
{
cgi.py
}
) as a CGI script. When invoked as a script, the file
will dump its environment and the contents of the form in HTML form.
Give it the right mode etc, and send it a request. If it's installed
in the standard
\
cod
e
{
cgi-bin
}
directory, it should be possible to send it a
in the standard
\
fil
e
{
cgi-bin
}
directory, it should be possible to send it a
request by entering a URL into your browser of the form:
\bcode
\begin{verbatim}
...
...
@@ -337,19 +337,20 @@ gives another error (e.g. 500), there's an installation problem that
you should fix before trying to go any further. If you get a nicely
formatted listing of the environment and form content (in this
example, the fields should be listed as ``addr'' with value ``At Home''
and ``name'' with value ``Joe Blow''), the
\
cod
e
{
cgi.py
}
script has been
and ``name'' with value ``Joe Blow''), the
\
fil
e
{
cgi.py
}
script has been
installed correctly. If you follow the same procedure for your own
script, you should now be able to debug it.
The next step could be to call the
\code
{
cgi
}
module's test() function from
your script: replace its main code with the single statement
The next step could be to call the
\code
{
cgi
}
module's
\code
{
test()
}
function from your script: replace its main code with the single
statement
\bcode
\begin{verbatim}
cgi.test()
\end{verbatim}
\ecode
%
This should produce the same results as those gotten from installing
the
\
cod
e
{
cgi.py
}
file itself.
the
\
fil
e
{
cgi.py
}
file itself.
When an ordinary Python script raises an unhandled exception
(e.g. because of a typo in a module name, a file that can't be opened,
...
...
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