In web.py you have to define a class for the URL and functions for GET and POST within it. So then in the POST function of the URL class you can set form = web.input(). Below is a quick example of this structure.
class Index:
def GET(self):
#Your GET code here...
def POST(self):
input = web.input()