Created
April 28, 2010 20:48
-
-
Save gerad/382684 to your computer and use it in GitHub Desktop.
Setup an interactive console for Google AppEngine - similar to script/console in Rails.
This file contains hidden or 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
"""Convenience wrapper for starting an interactive appengine console.""" | |
import os | |
import sys | |
from subprocess import call | |
DIR_PATH = os.path.abspath(os.path.dirname(os.path.realpath('/usr/local/bin/dev_appserver.py'))) | |
EXTRA_PATHS = [ | |
DIR_PATH, | |
os.path.join(DIR_PATH, 'lib', 'antlr3'), | |
os.path.join(DIR_PATH, 'lib', 'django'), | |
os.path.join(DIR_PATH, 'lib', 'ipaddr'), | |
os.path.join(DIR_PATH, 'lib', 'webob'), | |
os.path.join(DIR_PATH, 'lib', 'yaml', 'lib'), | |
] | |
if __name__ == '__main__': | |
addl_path = os.pathsep.join(EXTRA_PATHS + sys.path) | |
call('PYTHONPATH=' + addl_path + ' python', shell=True) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment