Why bother? You can just put your Python script into a CGI-enabled server like you do with PHP:
#!/usr/local/bin/python2
import cgi
print "Content-type: text/html\n\n"
query = cgi.FieldStorage()
if "name" in query:
print "Hello, %s!" % query["name"].value
else:
print """
<p>Insert your name and hit Go! to get greeted!</p>
<form action='/cgi-bin/hello-py.cgi' method='get'>
<input type='text' name='name'/>
<button type='submit'>Go!</button>
</form>"""