summaryrefslogtreecommitdiff
path: root/sphinx/util/console.py
diff options
context:
space:
mode:
authorgeorg.brandl <devnull@localhost>2008-07-18 22:55:36 +0000
committergeorg.brandl <devnull@localhost>2008-07-18 22:55:36 +0000
commit31075afed9f8fa008a3ed2a9ff0d7ed024ff8564 (patch)
tree1dc24530c825039c6e2c0cfe649847b274241a56 /sphinx/util/console.py
parent7ab43cdfa391f4d647228378a8b2a252529697d2 (diff)
downloadsphinx-31075afed9f8fa008a3ed2a9ff0d7ed024ff8564.tar.gz
Merged revisions 64808,65013,65076,65100-65101,65119,65121-65123 via svnmerge from
svn+ssh://pythondev@svn.python.org/doctools/branches/0.4.x ........ r64808 | georg.brandl | 2008-07-08 21:39:33 +0200 (Tue, 08 Jul 2008) | 2 lines Allow relocation of source and doctree dir. ........ r65013 | georg.brandl | 2008-07-16 15:25:30 +0200 (Wed, 16 Jul 2008) | 2 lines Remove curious quote. ........ r65076 | georg.brandl | 2008-07-17 22:43:01 +0200 (Thu, 17 Jul 2008) | 2 lines Add a test for sphinx.quickstart. ........ r65100 | georg.brandl | 2008-07-18 14:41:54 +0200 (Fri, 18 Jul 2008) | 2 lines Fix phony targets. ........ r65101 | georg.brandl | 2008-07-18 14:55:03 +0200 (Fri, 18 Jul 2008) | 2 lines Fix problems in "make check". ........ r65119 | georg.brandl | 2008-07-18 23:06:42 +0200 (Fri, 18 Jul 2008) | 2 lines Emit a more precise error message in autodoc. ........ r65121 | georg.brandl | 2008-07-18 23:41:35 +0200 (Fri, 18 Jul 2008) | 2 lines Warn if a toctree-included document doesn't contain a title. ........ r65122 | georg.brandl | 2008-07-18 23:51:28 +0200 (Fri, 18 Jul 2008) | 2 lines Don't use \samp{} for code with whitespaces, only for :samp:`code`. ........ r65123 | georg.brandl | 2008-07-19 00:49:46 +0200 (Sat, 19 Jul 2008) | 2 lines Put inheritance info always on its own line. ........
Diffstat (limited to 'sphinx/util/console.py')
-rw-r--r--sphinx/util/console.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/sphinx/util/console.py b/sphinx/util/console.py
index ea41e249..05ab7e50 100644
--- a/sphinx/util/console.py
+++ b/sphinx/util/console.py
@@ -38,6 +38,9 @@ def print_and_backspace(text, func):
def nocolor():
codes.clear()
+def coloron():
+ codes.update(_orig_codes)
+
def colorize(name, text):
return codes.get(name, '') + text + codes.get('reset', '')
@@ -73,5 +76,7 @@ for i, (dark, light) in enumerate(_colors):
codes[dark] = '\x1b[%im' % (i+30)
codes[light] = '\x1b[%i;01m' % (i+30)
+_orig_codes = codes.copy()
+
for _name in codes:
create_color_func(_name)