0
votes

Hi I have created a google app engine project as follows from the example filename name of the following code main.py

import webapp2

class MainPage(webapp2.RequestHandler):
    def get(self):
        self.response.headers['Content-type'] = 'text/plain'
        self.response.write('Hello, World!')

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

and in app.yaml file I have added these configurations

application: casberra
version: 1
runtime: python27
api_version: 1
threadsafe: true

handlers:
- url: /.*
  script: main.application

earlier I have placed these files inside a folder named gae but when I try to run them from command gae/google_appengine/dev_appserver.py gae/ and by earlier configuration in app.yaml script: gae.application throws me an error saying no module named gae, but when I use the folder and the main.py name as main application ran smoothly. How may I use a different project file like gae or something than main?

1

1 Answers

0
votes

There is no limitation for main to be called main. I mean even in Google's Python tutorial they use helloworld.py, not main.py. If everything is properly named, it should go through. I just don't get why you put in a specific folder, seems like unecessary