Design questions (cgi programming with python)

Paul anon at nowhere.org
Wed Dec 25 17:54:59 EST 2002


I have to learn python in order for my uni project to progress.  It's
basically an e-learning website engine.  It has to be (ideally)one cgi file which
produces the initial page(with links for creating a new account, or
logging in).  Then, it has to process logins etc.

So, i;m having some trouble getting this done....i'm going to practice by
writing html output into the browser, along with a form who's action tag
points to the same script that generates the form itself.  I've done
similar things in C previously. (using the QUERY_STRING variable).
I've got a sample page rendering in a browser, but how can I get the program to
not re-display the initial page, and just process the cgi.

---------
#!/usr/bin/python
print "Content-type: text/html\n\n"

print """
<html>
....
</html>
"""
#(^^^that is always re-done when the html form is processed....)

import cgi
.....


many thanks for reading!
Merry Christmas!



More information about the Python-list mailing list