Show More
@@ -35,6 +35,8 b' from .pt_inputhooks import get_inputhook_func' | |||
|
35 | 35 | from .prompts import Prompts, ClassicPrompts, RichPromptDisplayHook |
|
36 | 36 | from .ptutils import IPythonPTCompleter, IPythonPTLexer |
|
37 | 37 | |
|
38 | DISPLAY_BANNER_DEPRECATED = object() | |
|
39 | ||
|
38 | 40 | |
|
39 | 41 | def get_default_editor(): |
|
40 | 42 | try: |
@@ -455,7 +457,11 b' class TerminalInteractiveShell(InteractiveShell):' | |||
|
455 | 457 | self.pt_cli.application.buffer.text = cast_unicode_py2(self.rl_next_input) |
|
456 | 458 | self.rl_next_input = None |
|
457 | 459 | |
|
458 | def interact(self): | |
|
460 | def interact(self, display_banner=DISPLAY_BANNER_DEPRECATED): | |
|
461 | ||
|
462 | if display_banner is not DISPLAY_BANNER_DEPRECATED: | |
|
463 | warn('interact `display_banner` argument is deprecated since IPython 5.0. Call `show_banner()` if needed.', DeprecationWarning, stacklevel=2) | |
|
464 | ||
|
459 | 465 | while self.keep_running: |
|
460 | 466 | print(self.separate_in, end='') |
|
461 | 467 | |
@@ -472,9 +478,11 b' class TerminalInteractiveShell(InteractiveShell):' | |||
|
472 | 478 | if self.autoedit_syntax and self.SyntaxTB.last_syntax_error: |
|
473 | 479 | self.edit_syntax_error() |
|
474 | 480 | |
|
475 | def mainloop(self): | |
|
481 | def mainloop(self, display_banner=DISPLAY_BANNER_DEPRECATED): | |
|
476 | 482 | # An extra layer of protection in case someone mashing Ctrl-C breaks |
|
477 | 483 | # out of our internal code. |
|
484 | if display_banner is not DISPLAY_BANNER_DEPRECATED: | |
|
485 | warn('mainloop `display_banner` argument is deprecated since IPython 5.0. Call `show_banner()` if needed.', DeprecationWarning, stacklevel=2) | |
|
478 | 486 | while True: |
|
479 | 487 | try: |
|
480 | 488 | self.interact() |
General Comments 0
You need to be logged in to leave comments.
Login now