Added a gaerun method to start application for google app engine #178

Merged
merged 1 commit into from Aug 24, 2012

Conversation

Projects
None yet
3 participants
Contributor

Habel commented Aug 24, 2012

I was trying to use google app engine for my project and ran into some difficulties with starting the web.py application in a mode that will run on GAE. I did some research and made this method that detects the version of python you're using (GAE is different depending on if you're using 2.5 or 2.7) and then does the correct thing for that version to run on GAE.

This pull request passes (merged 232de44 into 875ef3d).

Contributor

aaronsw commented Aug 24, 2012

Is there some way to detect we're on GAE and build this into app.run()?

Contributor

aaronsw commented Aug 24, 2012

Otherwise the commit is fine with me.

Contributor

Habel commented Aug 24, 2012

I tried asking around on the GAE irc, but no one responded. I could try their issue tracker, but I can't really think of a way to detect it without some on disk stuff.

Projects are configured with an app.yaml file like this:

application: appname
version: 1
runtime: python27
api_version: 1
threadsafe: true
handlers:
- url: /static
  static_dir: static

- url: /.*s
  script: code.app

I could check if the file is present in the current directory and if so, read the runtime label.

aaronsw merged commit 4f0e7c6 into webpy:master Aug 24, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment