Show More
@@ -113,7 +113,7 b' class InteractiveShellEmbed(TerminalInteractiveShell):' | |||||
113 | self.register_magics(EmbeddedMagics) |
|
113 | self.register_magics(EmbeddedMagics) | |
114 |
|
114 | |||
115 | def __call__(self, header='', local_ns=None, module=None, dummy=None, |
|
115 | def __call__(self, header='', local_ns=None, module=None, dummy=None, | |
116 | stack_depth=1, global_ns=None): |
|
116 | stack_depth=1, global_ns=None, compile_flags=None): | |
117 | """Activate the interactive interpreter. |
|
117 | """Activate the interactive interpreter. | |
118 |
|
118 | |||
119 | __call__(self,header='',local_ns=None,module=None,dummy=None) -> Start |
|
119 | __call__(self,header='',local_ns=None,module=None,dummy=None) -> Start | |
@@ -154,7 +154,8 b' class InteractiveShellEmbed(TerminalInteractiveShell):' | |||||
154 |
|
154 | |||
155 | # Call the embedding code with a stack depth of 1 so it can skip over |
|
155 | # Call the embedding code with a stack depth of 1 so it can skip over | |
156 | # our call and get the original caller's namespaces. |
|
156 | # our call and get the original caller's namespaces. | |
157 |
self.mainloop(local_ns, module, stack_depth=stack_depth, |
|
157 | self.mainloop(local_ns, module, stack_depth=stack_depth, | |
|
158 | global_ns=global_ns, compile_flags=compile_flags) | |||
158 |
|
159 | |||
159 | self.banner2 = self.old_banner2 |
|
160 | self.banner2 = self.old_banner2 | |
160 |
|
161 | |||
@@ -286,6 +287,7 b' def embed(**kwargs):' | |||||
286 | """ |
|
287 | """ | |
287 | config = kwargs.get('config') |
|
288 | config = kwargs.get('config') | |
288 | header = kwargs.pop('header', u'') |
|
289 | header = kwargs.pop('header', u'') | |
|
290 | compile_flags = kwargs.pop('compile_flags', None) | |||
289 | if config is None: |
|
291 | if config is None: | |
290 | config = load_default_config() |
|
292 | config = load_default_config() | |
291 | config.InteractiveShellEmbed = config.TerminalInteractiveShell |
|
293 | config.InteractiveShellEmbed = config.TerminalInteractiveShell | |
@@ -293,4 +295,4 b' def embed(**kwargs):' | |||||
293 | global _embedded_shell |
|
295 | global _embedded_shell | |
294 | if _embedded_shell is None: |
|
296 | if _embedded_shell is None: | |
295 | _embedded_shell = InteractiveShellEmbed(**kwargs) |
|
297 | _embedded_shell = InteractiveShellEmbed(**kwargs) | |
296 | _embedded_shell(header=header, stack_depth=2) |
|
298 | _embedded_shell(header=header, stack_depth=2, compile_flags=compile_flags) |
General Comments 0
You need to be logged in to leave comments.
Login now