Python CGI programming
Gerhard Häring
gerhard.nospam at bigfoot.de
Thu Feb 1 17:36:57 EST 2001
More information about the Python-list mailing list
Thu Feb 1 17:36:57 EST 2001
- Previous message (by thread): Programmatic control of scroll position in PmwScrolledFrame
- Next message (by thread): Python CGI programming
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Your Python code is ok. Assuming the Python interpreter really is at /usr/bin/python. If not, you must adjust the first line of the script to point to the location of the python interpreter. Another common place would be /usr/local/bin/python. First you should find out if the webserver supports user CGI scripts at all. If it does, these must normally be put in a directory named cgi-bin, like ~/home_html/cgi-bin. The script must also have the executable bit set (assuming you are on Unix, of course). chmod +x feedback.py sets the executable bit of your script. Gerhard seung-won hwang wrote: > > FYI, when I type the following example, web browser just shows > the source code..not the test string... How can I fix this? > > #!/usr/bin/python > > # Tell the browser how to render the text > print "Content-Type: text/plain\n\n" > > print "Hello, Python!" # print a test string -- Sorry for the fake email, please use the real one below to reply. contact: g e r h a r d @ b i g f o o t . d e web: http://highqualdev.com
- Previous message (by thread): Programmatic control of scroll position in PmwScrolledFrame
- Next message (by thread): Python CGI programming
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list