Newbie question, python code <-> web formulare

Richard Biffl usenet at REMOVETHISPHRASEblacklettersoftware.com
Wed May 8 00:18:12 EDT 2002


A good starting point is http://www.python.org/topics/web/. I haven't gotten
past a simple hello.py test program, but I found it easy with one of the CGI
examples and a tip from my webhost (cedant.com) that I needed to put the
file in my cgi-bin directory and make the first line of the file
#!/usr/bin/python so the file would be processed by the interpreter.
(Unfortunately, my webhost doesn't have mod_python installed -- another
reason I need my own server.)

The simple and apparently customary way to use python on the web is to have
your script write out the html, the way other cgi programs work. There are
application servers that can process python scripts embedded in html -- at
least, I know of Webware, http://webware.sourceforge.net/ -- if you want
python embedded in html, similar to php.

  Richard

"Ben Thursfield" <Thursfield at west.de> wrote in message
news:3CD80F0E.1B4AC97E at west.de...
>
> I've been programming a bit in python for a few days now, und I'm now at
> the point where I want to embed my Python code into my webpage somehow.
> For example I'm connecting to my mailserver using the socket lib and I
> want to be able to transfer data between the python program and a web
> formulare (e.g. login+pass). I don't know how to manage that though. I
> manage it when i do it locally but i don't know how to get my webhost to
> run the python programm so i can communicate with it.
> Is this possible at all? Can I use Python in a PHP manner?






More information about the Python-list mailing list