1

How do i get form data in my Python code. Below is my current code.

import cgitb; cgitb.enable()
import cgi
import sys

form = cgi.FieldStorage()
name = form.getValue('name')
print 'Hello ' + name

1 Answer 1

3

You were close:

form = cgi.FieldStorage()
name = form['name'].value
print 'Hello ' + name
Sign up to request clarification or add additional context in comments.

1 Comment

May I know what should i do to make this work in Google App Engine? Thanks!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.