##// END OF EJS Templates
Fix set_next_input on Python 2
Thomas Kluyver -
Show More
@@ -4,7 +4,7 b' from __future__ import print_function'
4 import sys
4 import sys
5
5
6 from IPython.core.interactiveshell import InteractiveShell
6 from IPython.core.interactiveshell import InteractiveShell
7 from IPython.utils.py3compat import PY3
7 from IPython.utils.py3compat import PY3, cast_unicode_py2
8 from traitlets import Bool, Unicode, Dict
8 from traitlets import Bool, Unicode, Dict
9
9
10 from prompt_toolkit.completion import Completer, Completion
10 from prompt_toolkit.completion import Completer, Completion
@@ -177,7 +177,7 b' class PTInteractiveShell(InteractiveShell):'
177
177
178 def pre_prompt(self):
178 def pre_prompt(self):
179 if self.rl_next_input:
179 if self.rl_next_input:
180 self.pt_cli.application.buffer.text = self.rl_next_input
180 self.pt_cli.application.buffer.text = cast_unicode_py2(self.rl_next_input)
181 self.rl_next_input = None
181 self.rl_next_input = None
182
182
183 def interact(self):
183 def interact(self):
General Comments 0
You need to be logged in to leave comments. Login now