I am in the application engine project where I would like to add a link to the Javascript test runner, which I would like to use only when starting the development server. I conducted several experiments in the local shell with the configuration loaded using the method found in NoseGAE and in real time on the "App Engine Console" [1], and it looks to me like a separate battle of a real instance, and the dev server is the presence module google.appengine.tools. Which led me to this utility function:
def is_dev():
"""
Tells us if we're running under the development server or not.
:return:
``True`` if the code is running under the development server.
"""
try:
from google.appengine import tools
return True
except ImportError:
return False
The question (finally!) Will be: is this a bad idea? And in that case, can anyone suggest a better approach?
[1] http://con.appspot.com/console/ ( )