Browse files

Fix issue preventing console use with Google App Engine

A merge of recent changes to werkzeug's debug console.  This patch
addresses an issue with the console and Google App Engine which was
preventing the result of code operations from reaching the actual
console.  With this patch sys.stdout is saved to a temporary variable
for restoration after the code is run.
  • Loading branch information...
1 parent d962447 commit 597c15a3d9d980ec6cab5d2f9b3b30e634ba930a @nigelsmith nigelsmith committed Jun 15, 2012
Showing with 6 additions and 1 deletion.
  1. +6 −1 pyramid_debugtoolbar/
@@ -203,7 +203,12 @@ def __init__(self, globals=None, locals=None):
self._ipy = _InteractiveConsole(globals, locals)
def eval(self, code):
- return self._ipy.runsource(code)
+ old_sys_stdout = sys.stdout
+ try:
+ return self._ipy.runsource(code)
+ finally:
+ sys.stdout = old_sys_stdout
class _ConsoleFrame(object):
"""Helper class so that we can reuse the frame console code for the

0 comments on commit 597c15a

Please sign in to comment.