This series is a part of Club ShowMeDo. Click to learn why you should join our
club with a simple monthly subscription.
We teach Python and all the cool modules
Topics include beginner Python, GUIs, Web and Desktop Apps
Long, specially crafted video tutorials just for you
Club video tutorials extend our normal Free content
Save your time - we've done the research for you
Keep your skills up-to-date
Learn at your own pace, everything you need is shown to you
Over 12 hours of archived material are waiting for you in the club
 Kyran Dale
I'm one of the co-founders of Showmedo and an academic researcher by profession. My peripatetic path has taken me from a Philosophy degree via Artificial Intelligence and Evolutionary Robotics to a PhD in Neuroscience. I spent five years in a small room with a colony of reluctant bumble-bees, becomi ...
Handling Forms With webapp [ID:722] (5/5)
in series:A Gentle Introduction to the Google App Engine Python SDK
 Kyran Dale
I'm one of the co-founders of Showmedo and an academic researcher by profession. My peripatetic path has taken me from a Philosophy degree via Artificial Intelligence and Evolutionary Robotics to a Ph ...
Our authors tell us that feedback from you is a big motivator. Please take a few moments to let them know what you think of their work.
(Showmedo is undergoing major changes. To
report any problems viewing the videos please
email us and include
browser and OS specifics. Cheers - Kyran.)
In this video we show a simple example of how the webapp framework deals with user input to generate a response to a posted web-form. Two handlers are used, the first to generate the form and the second to respond to the user input.
# Handling Forms With webapp
# s = cgi.escape( """& < >""" ) --> s = "& < >"
from google.appengine.api import users
from google.appengine.ext import webapp
<form action="/sign" method="post">
<div><textarea name="content" rows="3" cols="60"></textarea></div>
<div><input type="submit" value="Sign Guestbook"></div>
user = users.get_current_user()
name_str = user.nickname()
name_str = 'anonymous'
application = webapp.WSGIApplication(
if __name__ == "__main__":
#app.yaml config script:
#- url: /.*
Are you learning Python? To keep the site running clean and ad-free we've started Club ShowMeDo. The club will allow you access to some special videos we're making to pass on programming skills we consider important to the development and enjoyment of Free Open Source Software (FOSS).
The focus at the moment is on developing with the Python programming language, one of the backbones of the FOSS movement with a huge number of included and third-party libraries.
We welcome feedback and we want to hear your ideas.
Showmedo's development is fairly rapid and bugs will inevitably creep in. If you have any problems please drop us a line using the contact address below. Likewise, any suggestions for improvements to the site are gratefully received.