I guess your python script isn't getting executed.

a. I guess you might have to tweak the server if the script is not
getting executed.
b. Maybe your script is getting executed but you are not setting the
"Content-type" parameter which is essential for browser that it is an
html page.

Note :- Set "Content-type" to "text/html" I guess this should work


regards
prasad chandrasekaran










--- Cancer cures smoking

-----Original Message-----
From: Efrat Regev [mailto:[EMAIL PROTECTED]
Sent: Friday, September 30, 2005 4:20 PM
To: python-list@python.org
Subject: Python CGI Script

     Hello,

     I'm a data-structures course TA trying to write a python CGI script

for automatically compiling and testing students' projects.
Unfortunately, I've run into some questions while writing this, which I
couldn't solve with the various (and helpful) python-CGI documentation.
(It's possible that I'm posting to the wrong group; if so, I'd
appreciate suggestions for the appropriate group.)


1. In my HTML page, I have the following:

<form method="post" action="submission_processor.py"
enctype="multipart/form-data">
....
</form>

     In the above, submission_processor.py is the python CGI script. I
didn't write a URL in the action field, since I'm first testing
everyting on a local machine (running FC4). The first line of
submission_processor.py is

#!/usr/bin/python

and I've done

chmod +x submission_processor.py

     When I hit the "submit" button, my browser (Firefox on FC4) doesn't

run the script; it asks me whether it should open
submission_processor.py or save it to disk. I couldn't figure out why.

2. My HTML page has the option for an instructor to list the various
submissions and scores. Obviously, this should be inaccessible to
students. The instructor has a password for doing this, therefore.
Suppose I place the password inside a python script, and give this
script only +x permission for others. Is this  adequate as far as
security?


     Thanks in advance for answering these questions.


      Efrat


This message contains information that may be privileged or confidential and is 
the property of the Capgemini Group. It is intended only for the person to whom 
it is addressed. If you are not the intended recipient,  you are not authorized 
to read, print, retain, copy, disseminate,  distribute, or use this message or 
any part thereof. If you receive this  message in error, please notify the 
sender immediately and delete all  copies of this message.

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to