Created
February 19, 2012 13:59
-
-
Save spacetime/1863968 to your computer and use it in GitHub Desktop.
Simple AppEngine code to add two numbers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Bare bones Example used to demonstrate processing by AppEngine for data sent through the Android app | |
from google.appengine.ext import webapp | |
from google.appengine.ext.webapp import util | |
class MainHandler(webapp.RequestHandler): | |
def post(self): | |
num1 = self.request.get('num1') | |
num2 = self.request.get('num2') | |
num3= int(num1)*int(num2) | |
self.response.out.write(num3) | |
def main(): | |
application = webapp.WSGIApplication([('/', MainHandler)], | |
debug=True) | |
util.run_wsgi_app(application) | |
if __name__ == '__main__': | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment