basic cgi question

Gerhard Häring gerhard.haering at gmx.de
Tue Sep 3 16:29:19 EDT 2002


Jeffrey Keil wrote in comp.lang.python:
> Greetings:
> 
> I've used Perl in the past for cgi programs. I thought I'd play around
> a little with Python. I've tried a few experiments.
> 
> I have programs that prints out to the browser. Unfortunately, it
> prints out everything, including the "import" statements, "print",
> etc. I'm not quite sure what I'm doing wrong.

Your web server doesn't handle the Python script as a CGI script, but
as a normal document instead.

So the answer is: configure your web server appropriately.

Depending on your webserver, one of these groups is appropriate for
questions about configuration:

comp.infosystems.www.servers.mac
comp.infosystems.www.servers.misc
comp.infosystems.www.servers.ms-windows
comp.infosystems.www.servers.unix

You can also find some Python specific answers for at least IIS,
Apache on http://python.faqts.com and IIRC also in the Python FAQ.

-- Gerhard



More information about the Python-list mailing list