##// END OF EJS Templates
Convert cpasted code to unicode on Python 2...
Thomas Kluyver -
Show More
@@ -66,7 +66,7 b' def get_pasted_lines(sentinel, l_input=py3compat.input, quiet=False):'
66 prompt = ""
66 prompt = ""
67 while True:
67 while True:
68 try:
68 try:
69 l = l_input(prompt)
69 l = py3compat.str_to_unicode(l_input(prompt))
70 if l == sentinel:
70 if l == sentinel:
71 return
71 return
72 else:
72 else:
@@ -181,7 +181,7 b' class TerminalMagics(Magics):'
181
181
182 quiet = ('q' in opts)
182 quiet = ('q' in opts)
183
183
184 sentinel = opts.get('s', '--')
184 sentinel = opts.get('s', u'--')
185 block = '\n'.join(get_pasted_lines(sentinel, quiet=quiet))
185 block = '\n'.join(get_pasted_lines(sentinel, quiet=quiet))
186 self.store_or_execute(block, name)
186 self.store_or_execute(block, name)
187
187
General Comments 0
You need to be logged in to leave comments. Login now