ok
first off, many web hosts support scripting languages, but as they include php, perl, etc.. many do not support python.
the good news is...
you can host the site yourself.
apache is available for windows and they have great documentation and support.
heck, i will even host your site (i am hosting four sites now) if you are not going to get more than a thousand hits/day.
what i am saying is.... its easy... seems intimidating at first, but all things technical do. what you need is python, apache and the mod_python module. you edit the configuration file to have apache start the mod_python module when apache starts. put your scripts in a folder called cgi-bin (usually) look for a line in the apache configuration file called Script-Alias. this is also where the scripts would go if you upload them to a host. almost always not the same folder where the html stuff goes.
and, yeah, the scripts whatever.py has to be on the server because they are server side scripts. server side means that all the data process is done at the server and the results are posted to the web page.
when you call print, and you are printing html, it is printing to the web browser.
in the two scripts i posted, the html form passes data to the python script, the python script takes that info (username and password) and creates a webpage that
does something based on whether or not the username and password match what the script says. the base line is that the python script actually creates html code.
another reason it did not work is the first line of the scrip.
The one that starts with a pound-bang (#!)
#!/usr/bin/python
That is a linux thing.
check this link for how to set that line up correctly i think its C:\python24
but i am not sure. i stupidly assumed that you use linux because most servers use either linux or unix check here for windows
check the apache docs for how to set up their server on your windows box. apache runs on windows too. but i am not very familliar with it. i think you
must have it installed and running to execute a cgi python script from your
own computer. maybe there is another freeware app out there,, a light server that may do you better . even if you dont host the site yourself, you can use a webserver on your home computer to test out your scripts because it is much easier to debug and re-arrange right there and then upload when you know it does exactly what you want.
Keep me posted on how its working out. if i dont know the answer, i can find it somewhere.