[IPython-User] Disabling color in IPython
Sun Oct 9 01:24:22 CDT 2011
On Sat, Oct 8, 2011 at 22:34, Aaron Meurer <firstname.lastname@example.org> wrote:
> This is on Mac OS X.
> Here is my IPython profile, if that helps:
> I'm guessing that having my colors set to 'linux' in my profile has
> something to do with it.
Yes - this is a silly thing that we need to figure out. The 'colors' cl_arg
sets InteractiveShell.colors. You have set TerminalInteractiveShell.colors,
which is a subclass, and thus takes precedence. So when you have colors set
in your config, and *also* at the command-line, you will be starting up
IPython with config:
c.InteractiveShell.colors = 'NoColor'
c.TerminalInteractiveShell.colors = 'Linux'
Now, if you change your config file to specify InteractiveShell.colors
instead of TerminalInteractiveShell.colors, the cl-arg will properly
What we should really do is adjust the cl-arg system, such that it maps
somehow to all subclasses, or possibly just the lowest active subclass, so
it always gets highest priority.
> Aaron Meurer
> On Sat, Oct 8, 2011 at 11:12 PM, Fernando Perez <email@example.com>
> > Hi Aaron,
> > On Sat, Oct 8, 2011 at 9:48 PM, Aaron Meurer <firstname.lastname@example.org> wrote:
> >> I'm trying to figure out how to disable colors from the command line.
> >> The IPython help (ipython --help) says:
> >> --colors=<CaselessStrEnum> (InteractiveShell.colors)
> >> Default: 'LightBG'
> >> Choices: ('NoColor', 'LightBG', 'Linux')
> >> Set the color scheme (NoColor, Linux, or LightBG).
> >> I've tried ipython --colors=NoColor, ipython --colors="NoColor",
> >> ipython --colors='NoColors', ipython --colors NoColor, and none of
> >> them work (if I type just 1<Enter>, say, Out is red). I do have
> >> the colors set in my config file (c.TerminalInteractiveShell.colors =
> >> 'Linux'). I tried in the 0.11 release and the git master.
> >> Am I doing this wrong, or is this a bug?
> > That's very odd, it works perfectly fine for me here...
> > "--colors=NoColor" turns off all coloring for me for In, Out,
> > tracebacks, etc, as expected.
> > This is on a linux system, I assume?
> > Cheers,
> > f
> IPython-User mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the IPython-User