Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6161355
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T21:27:51+00:00 2026-05-23T21:27:51+00:00

I am trying to make some python scripts on google appspot. I am just

  • 0

I am trying to make some python scripts on google appspot. I am just starting with python so I don’t now verry much about it.

I am using the example code you can find on the google appspot documentations. But whenever I submit the form in this code, I just get an blank page and no errors. Anyone knows why?

import cgi

from google.appengine.api import users
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app

class MainPage(webapp.RequestHandler):  

    def get(self):
      p = self.request.get("p", default_value="25")

      self.response.out.write("""
          <html>
            <body>
              <form action="/" method="post">
        The first <input type="text" name="p" value=""" + p + """ style="width: 35px;text-align:center;"> fibionacci numbers:<br />""")

      p = int(p)
      a, b = 0, 1
      while p > 0:
    self.response.out.write(str(b) + " ")
    a, b = b, a+b
    p = p - 1

      self.response.out.write("""
              </form>
            </body>
          </html>""")


application = webapp.WSGIApplication([('/', MainPage)],
                                     debug=True)

def main():
    run_wsgi_app(application)

if __name__ == "__main__":
    main()

Thank you in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T21:27:52+00:00Added an answer on May 23, 2026 at 9:27 pm

    WOAH

    If you’re using google app engine (hosted on appspot so I’m sure that’s what you’re using) then you use this:

    tPostVariable = self.request.get('PostVariableName')
    

    If you’ve set up your handler like this then it will automagically work:

    class ClassName(webapp.RequestHandler):
        #For Get Pages
        def get(self):
            tPostVariable = self.request.get('PostVariableName')
    
        #For Post Pages
        def post(self):
            tPostVariable = self.request.get('PostVariableName')
    

    That will work for both GET and POST variables.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to make some data from database available using XML, I have
I'm trying to make some types in Django that map to standard Django types.
I'm trying to make sure some data is auto-deleted when there's no more references
I'm currently trying to read in an XML file, make some minor changes (alter
I'm designing some VB based ASP.NET 2.0, and I am trying to make more
I'm trying to build a C++ extension for python using swig. I've followed the
I'm trying to scrape a webpage using Selenium (in Python) that is almost entirely
I am working with someone else's code and trying to make some modifications. So
I'm just trying to make my understanding of Exception mechanism more clear. If something
Trying to make a make generic select control that I can dynamically add elements

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.