Configuraion to run pyhton script on ubuntu 12.04

Jaiky jaiprakashsingh213 at gmail.com
Sun Jul 28 06:32:33 EDT 2013


want to run a python script which contains simple form of html on firefox browser ,  but dont know what should be the configuration on ubuntu 12.04  to run this script  i.e cgi configuration 



My code is 
ubder 
in /var/www/cgi-bin/forms__.py



#!/usr/bin/env python
import webapp2

form ="""
  <form action="//www.google.com/search">
    <input name="q">
    <input type="submit">
  </form>"""


class MainPage(webapp2.RequestHandler):
    def get(self):
        #self.response.headers['Content-Type'] = 'text/plain'
        self.response.out.write(form)

app = webapp2.WSGIApplication([('/', MainPage)],
                             debug=True)





More information about the Python-list mailing list