##// END OF EJS Templates
Remove outdated colors_force attribute
Thomas Kluyver -
Show More
@@ -254,15 +254,6 b' class InteractiveShell(SingletonConfigurable):'
254 254 default_value=get_default_colors(),
255 255 help="Set the color scheme (NoColor, Linux, or LightBG)."
256 256 ).tag(config=True)
257 colors_force = Bool(False, help=
258 """
259 Force use of ANSI color codes, regardless of OS and readline
260 availability.
261 """
262 # FIXME: This is essentially a hack to allow ZMQShell to show colors
263 # without readline on Win32. When the ZMQ formatting system is
264 # refactored, this should be removed.
265 )
266 257 debug = Bool(False).tag(config=True)
267 258 deep_reload = Bool(False, help=
268 259 """
@@ -335,31 +335,16 b' Currently the magic system has the following functions:""",'
335 335 # local shortcut
336 336 shell = self.shell
337 337
338
339
340 if not shell.colors_force:
341 if sys.platform in {'win32', 'cli'}:
342 import IPython.utils.rlineimpl as readline
343 if not readline.have_readline:
344 msg = """\
345 Proper color support under MS Windows requires the pyreadline library.
346 You can find it at:
347 http://ipython.org/pyreadline.html
348
349 Defaulting color scheme to 'NoColor'"""
350 new_scheme = 'NoColor'
351 warn(msg)
352
353 elif not shell.has_readline:
354 # Coloured prompts get messed up without readline
355 # Will remove this check after switching to prompt_toolkit
356 new_scheme = 'NoColor'
338 # Set shell colour scheme
339 try:
340 shell.colors = new_scheme
341 shell.refresh_style()
342 except:
343 color_switch_err('shell')
357 344
358 345 # Set exception colors
359 346 try:
360 347 shell.InteractiveTB.set_colors(scheme = new_scheme)
361 shell.colors = new_scheme
362 shell.refresh_style()
363 348 shell.SyntaxTB.set_colors(scheme = new_scheme)
364 349 except:
365 350 color_switch_err('exception')
@@ -87,8 +87,6 b' else:'
87 87 _use_simple_prompt = ('IPY_TEST_SIMPLE_PROMPT' in os.environ) or (not _is_tty)
88 88
89 89 class TerminalInteractiveShell(InteractiveShell):
90 colors_force = True
91
92 90 space_for_menu = Integer(6, help='Number of line at the bottom of the screen '
93 91 'to reserve for the completion menu'
94 92 ).tag(config=True)
General Comments 0
You need to be logged in to leave comments. Login now