![]() |
|
Customer Support
Importing the Python cgi module doesn't work.
The following code is how you import the python cgi module:#!/usr/bin/python2.1If that is giving you a traceback error, then you are probably trying to run it on the command line, which is not supposed to work.
import cgi
"Unfortunately, a CGI script will generally not run when you try it from the command line, and a script that works perfectly from the command line may fail mysteriously when run from the server. There's one reason why you should still test your script from the command line: if it contains a syntax error, the Python interpreter won't execute it at all, and the HTTP server will most likely send a cryptic error to the client."
Related Questions:
How do I use sendmail with perl?
How do I use cgi scripts?
My formmail.pl script from Matt's Script Archive doesn't work.
Why does Sbox say "no such file or directory" but the files are there?
What Perl modules are installed?
Do you offer CGI? What scripts can I install?
I can't get the python socket module to work?
Why do I get: Sbox error file is world writable?
What is the path to perl or some other program?
Sendmail does not work or does not accept my optional arguments.
How do I use MySQL with Python?
What version of Python do you support and what modules are available?
Why do I get: Sbox Error exec of [some script] failed (Exec format error)?
Why do I get: Sbox error file not world executable?
Why do I get: Sbox error the directory containing [some script] is world writable?
Why do I get: Sbox Error exec of [some script] failed (Permission denied)
Why do I get: Sbox error: cannot run suid scripts
Why do I get: Sbox Error exec of [some script] failed (Resource temporarily unavailable)
Browse Categories:Getting Started, FTP, Telnet/SSH, Moving Domains, E-mail, Traffic Reports, Mailing Lists, Apache, PHP, CGI, Other Server-Side Scripting, MySQL Database, Imaging Libraries, Other Software, Billing & Terms, Control Panel, E-commerce, Pre-Sales |

