From: ken s. <ken...@gm...> - 2007-01-31 16:05:43
|
On 1/31/07, Mark Heneghan <mar...@gm...> wrote: > Hi, > > Im a complete beginner with python. I was wondering could anyone help me out > with some CGI stuff. Basically I have a few programs which are the basic > control functions for a robot i have built. They work fine when run from > terminal, but how do i go about being able to run these files through the > Gumstix web server? you're going to have to read about python, cgi, perhaps other topics. http://www.python.org/doc/ http://docs.python.org/lib/module-cgi.html here's a simple example: stick these as executable in /var/www/cgi-bin then http://gumstix-url/cgi-bin/test.py # cat hello.py #!/usr/bin/python print "Content-type: text/html\n\n" print "hello python\n" # cat test.py #!/usr/bin/python import cgi import cgitb;cgitb.enable() import os cgi.test() |