This file contains 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
"""Initianlize GAE Python environment so you can work with it from the REPL""" | |
from os import environ | |
import sys | |
sys.path.insert(0, environ.get('GAE_PY_SDK', '/opt/google_appengine')) | |
import dev_appserver # noqa | |
dev_appserver.fix_sys_path() | |
from google.appengine.ext import testbed # noqa | |
tb = testbed.Testbed() | |
tb.activate() | |
tb.init_all_stubs() |
In [1]: %run initgae.py
In [2]: %run app.py
And then I can work with my code and test things out.