diff --git a/IPython/core/interactiveshell.py b/IPython/core/interactiveshell.py index cb2e361..3eeb049 100644 --- a/IPython/core/interactiveshell.py +++ b/IPython/core/interactiveshell.py @@ -254,15 +254,6 @@ class InteractiveShell(SingletonConfigurable): default_value=get_default_colors(), help="Set the color scheme (NoColor, Linux, or LightBG)." ).tag(config=True) - colors_force = Bool(False, help= - """ - Force use of ANSI color codes, regardless of OS and readline - availability. - """ - # FIXME: This is essentially a hack to allow ZMQShell to show colors - # without readline on Win32. When the ZMQ formatting system is - # refactored, this should be removed. - ) debug = Bool(False).tag(config=True) deep_reload = Bool(False, help= """ diff --git a/IPython/core/magics/basic.py b/IPython/core/magics/basic.py index 1108ffb..b70f977 100644 --- a/IPython/core/magics/basic.py +++ b/IPython/core/magics/basic.py @@ -335,31 +335,16 @@ Currently the magic system has the following functions:""", # local shortcut shell = self.shell - - - if not shell.colors_force: - if sys.platform in {'win32', 'cli'}: - import IPython.utils.rlineimpl as readline - if not readline.have_readline: - msg = """\ -Proper color support under MS Windows requires the pyreadline library. -You can find it at: -http://ipython.org/pyreadline.html - -Defaulting color scheme to 'NoColor'""" - new_scheme = 'NoColor' - warn(msg) - - elif not shell.has_readline: - # Coloured prompts get messed up without readline - # Will remove this check after switching to prompt_toolkit - new_scheme = 'NoColor' + # Set shell colour scheme + try: + shell.colors = new_scheme + shell.refresh_style() + except: + color_switch_err('shell') # Set exception colors try: shell.InteractiveTB.set_colors(scheme = new_scheme) - shell.colors = new_scheme - shell.refresh_style() shell.SyntaxTB.set_colors(scheme = new_scheme) except: color_switch_err('exception') diff --git a/IPython/terminal/interactiveshell.py b/IPython/terminal/interactiveshell.py index 86326a9..7c0f94c 100644 --- a/IPython/terminal/interactiveshell.py +++ b/IPython/terminal/interactiveshell.py @@ -87,8 +87,6 @@ else: _use_simple_prompt = ('IPY_TEST_SIMPLE_PROMPT' in os.environ) or (not _is_tty) class TerminalInteractiveShell(InteractiveShell): - colors_force = True - space_for_menu = Integer(6, help='Number of line at the bottom of the screen ' 'to reserve for the completion menu' ).tag(config=True)