##// END OF EJS Templates
Revert "converted multi-context with-statements to nested (2.6 compatibility)"...
Mike McKerns -
Show More
@@ -242,9 +242,8 b' class InteractiveShellEmbed(TerminalInteractiveShell):'
242 # actually completes using the frame's locals/globals
242 # actually completes using the frame's locals/globals
243 self.set_completer_frame()
243 self.set_completer_frame()
244
244
245 with self.builtin_trap:
245 with self.builtin_trap, self.display_trap:
246 with self.display_trap:
246 self.interact(display_banner=display_banner)
247 self.interact(display_banner=display_banner)
248
247
249 # now, purge out the local namespace of IPython's hidden variables.
248 # now, purge out the local namespace of IPython's hidden variables.
250 if local_ns is not None:
249 if local_ns is not None:
@@ -422,20 +422,19 b' class TerminalInteractiveShell(InteractiveShell):'
422 internally created default banner.
422 internally created default banner.
423 """
423 """
424
424
425 with self.builtin_trap:
425 with self.builtin_trap, self.display_trap:
426 with self.display_trap:
427
426
428 while 1:
427 while 1:
429 try:
428 try:
430 self.interact(display_banner=display_banner)
429 self.interact(display_banner=display_banner)
431 #self.interact_with_readline()
430 #self.interact_with_readline()
432 #XXX for testing of a readline-decoupled repl loop, call
431 # XXX for testing of a readline-decoupled repl loop, call
433 # interact_with_readline above
432 # interact_with_readline above
434 break
433 break
435 except KeyboardInterrupt:
434 except KeyboardInterrupt:
436 # this should not be necessary, but KeyboardInterrupt
435 # this should not be necessary, but KeyboardInterrupt
437 # handling seems rather unpredictable...
436 # handling seems rather unpredictable...
438 self.write("\nKeyboardInterrupt in interact()\n")
437 self.write("\nKeyboardInterrupt in interact()\n")
439
438
440 def _replace_rlhist_multiline(self, source_raw, hlen_before_cell):
439 def _replace_rlhist_multiline(self, source_raw, hlen_before_cell):
441 """Store multiple lines as a single entry in history"""
440 """Store multiple lines as a single entry in history"""
General Comments 0
You need to be logged in to leave comments. Login now