From: Armin Ronacher Date: Sun, 25 Sep 2011 12:30:12 +0000 (+0200) Subject: Added GAE debugging snippet X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=c1bc16415bbaa03d663e6de91fae529c8ec4bb6c;p=jinja2.git Added GAE debugging snippet --- diff --git a/docs/faq.rst b/docs/faq.rst index 2e4be8c..d066bff 100644 --- a/docs/faq.rst +++ b/docs/faq.rst @@ -153,6 +153,18 @@ the traceback may be incomplete. There is currently no good workaround for Jython or the AppEngine as ctypes is unavailable there and it's not possible to use the debugsupport extension. +If you are working in the Google Appengine development server you can +whitelist the ctypes module to restore the tracebacks. This however won't +work in production environments:: + + import os + if os.environ.get('SERVER_SOFTWARE', '').startswith('Dev'): + from google.appengine.tools.dev_appserver import HardenedModulesHook + HardenedModulesHook._WHITE_LIST_C_MODULES += ['_ctypes', 'gestalt'] + +Credit for this snippet goes to `Thomas Johansson +`_ + Why is there no Python 2.3 support? -----------------------------------