# HG changeset patch
# User Volker Braun <vbraun@stp.dias.ie>
# Date 1362080002 36000
# Node ID 146639f9b98662a278732d2c050ec66014ce1577
# Parent 8d5b47f3219290706989a2749735e47c5b98c8d5
Switch off color in doctests
diff --git a/sage/interfaces/sage0.py b/sage/interfaces/sage0.py
a
|
b
|
|
145 | 145 | else: |
146 | 146 | # Disable the IPython history (implemented as SQLite database) |
147 | 147 | # to avoid problems with locking. |
148 | | command = "sage-ipython --HistoryManager.hist_file=:memory:" |
| 148 | command = "sage-ipython --HistoryManager.hist_file=:memory: --colors=NoColor" |
149 | 149 | prompt = "sage: " |
150 | 150 | if init_code is None: |
151 | | init_code = ['import cPickle', '%colors NoColor'] |
| 151 | init_code = ['import cPickle'] |
152 | 152 | |
153 | 153 | Expect.__init__(self, |
154 | 154 | name = 'sage', |
diff --git a/sage/misc/interpreter.py b/sage/misc/interpreter.py
a
|
b
|
|
660 | 660 | verbose_crash = True), |
661 | 661 | TerminalInteractiveShell = Config( |
662 | 662 | ast_node_interactivity = 'all', |
663 | | colors = 'LightBG', |
| 663 | colors = 'LightBG' if sys.stdout.isatty() else 'NoColor', |
664 | 664 | confirm_exit = False, |
665 | 665 | separate_in = ''), |
666 | 666 | # The extension is *always* loaded for SageTerminalApp |