##// END OF EJS Templates
Avoid loading readline in the kernel...
Thomas Kluyver -
Show More
@@ -334,23 +334,25 b' Currently the magic system has the following functions:""",'
334 # local shortcut
334 # local shortcut
335 shell = self.shell
335 shell = self.shell
336
336
337 import IPython.utils.rlineimpl as readline
338
337
339 if not shell.colors_force and \
338
340 not readline.have_readline and \
339 if not shell.colors_force:
341 (sys.platform == "win32" or sys.platform == "cli"):
340 if sys.platform in {'win32', 'cli'}:
342 msg = """\
341 import IPython.utils.rlineimpl as readline
342 if not readline.have_readline:
343 msg = """\
343 Proper color support under MS Windows requires the pyreadline library.
344 Proper color support under MS Windows requires the pyreadline library.
344 You can find it at:
345 You can find it at:
345 http://ipython.org/pyreadline.html
346 http://ipython.org/pyreadline.html
346
347
347 Defaulting color scheme to 'NoColor'"""
348 Defaulting color scheme to 'NoColor'"""
348 new_scheme = 'NoColor'
349 new_scheme = 'NoColor'
349 warn(msg)
350 warn(msg)
350
351
351 # readline option is 0
352 elif not shell.has_readline:
352 if not shell.colors_force and not shell.has_readline:
353 # Coloured prompts get messed up without readline
353 new_scheme = 'NoColor'
354 # Will remove this check after switching to prompt_toolkit
355 new_scheme = 'NoColor'
354
356
355 # Set prompt colors
357 # Set prompt colors
356 try:
358 try:
General Comments 0
You need to be logged in to leave comments. Login now