##// END OF EJS Templates
allow unicode in Shell.raw_input
MinRK -
Show More
@@ -566,11 +566,14 b' class TerminalInteractiveShell(InteractiveShell):'
566 if self.has_readline:
566 if self.has_readline:
567 self.set_readline_completer()
567 self.set_readline_completer()
568
568
569 # raw_input expects str, but we pass it unicode sometimes
570 prompt = py3compat.cast_bytes_py2(prompt)
571
569 try:
572 try:
570 line = py3compat.str_to_unicode(self.raw_input_original(prompt))
573 line = py3compat.str_to_unicode(self.raw_input_original(prompt))
571 except ValueError:
574 except ValueError:
572 warn("\n********\nYou or a %run:ed script called sys.stdin.close()"
575 warn("\n********\nYou or a %run:ed script called sys.stdin.close()"
573 " or sys.stdout.close()!\nExiting IPython!")
576 " or sys.stdout.close()!\nExiting IPython!\n")
574 self.ask_exit()
577 self.ask_exit()
575 return ""
578 return ""
576
579
General Comments 0
You need to be logged in to leave comments. Login now