Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #2245 from bfroehle/qsnake_fix

Fix regression in embed() from pull-request #2096.
  • Loading branch information...
commit c90b6b0707e4b50fe283f4d35c2a69a61acdfd67 2 parents c749daf + 89b4dd7
@Carreau Carreau authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 IPython/frontend/terminal/embed.py
View
6 IPython/frontend/terminal/embed.py
@@ -200,7 +200,8 @@ class DummyMod(object):
module.__dict__ = global_ns
# Get locals and globals from caller
- if (local_ns is None or module is None) and self.default_user_namespaces:
+ if ((local_ns is None or module is None or compile_flags is None)
+ and self.default_user_namespaces):
call_frame = sys._getframe(stack_depth).f_back
if local_ns is None:
@@ -233,7 +234,8 @@ class DummyMod(object):
self.init_user_ns()
# Compiler flags
- self.compile.flags = compile_flags
+ if compile_flags is not None:
+ self.compile.flags = compile_flags
# Patch for global embedding to make sure that things don't overwrite
# user globals accidentally. Thanks to Richard <rxe@renre-europe.com>
Please sign in to comment.
Something went wrong with that request. Please try again.