self.response.out.write( primality(int(str(self.request.get('content')))) )The get() returns a unicode string. You need str() and int() to convert to a parameter that primality() understands. Print does not work on GAE. Have a second look at the 'Getting Started'' Example. http://code.google.com/appengine/docs/gettingstarted/usingwebapp.html 2009/1/13 Joaquim <[email protected]>: > > Hi !! > > I'm pretty new to web development and I am trying to do a script that > show a FORM where you can write a number and when you hit a button, > the script does some stuff with this number and prints you a result. > > I am using the web apps examples from the begginer guide, but I am > stuck at the part of moving the number writed in the form. > > I understand pretty much all the code, but when the user clicks and my > class executes... > > class Primalidad(webapp.RequestHandler): > def post(self): > print primality(cgi.escape(self.request.get('content'))) > > and then I have a function called 'primality' that obviously checks if > the number is prime and prints "True" or "False" > > Actually all I have is a big "Error: Server Error" > > Well I hope I eplained myself as good as I think, see if somebody can > hel me over here. > > Thank you!! > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~----------~----~----~----~------~----~------~--~---
