From c1bc16415bbaa03d663e6de91fae529c8ec4bb6c Mon Sep 17 00:00:00 2001 From: Armin Ronacher Date: Sun, 25 Sep 2011 14:30:12 +0200 Subject: [PATCH] Added GAE debugging snippet --- docs/faq.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/faq.rst b/docs/faq.rst index 2e4be8c21..d066bffa1 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? -----------------------------------