[IPython-dev] pyreadline [PATCH] AnsiWriter incorrectly applies background color

David Shilvock davels at telus.net
Wed Dec 17 00:10:30 EST 2008


I've been out of touch with IPython development for a while.  The website
for pyreadline says the svn repo is current but it doesn't look like there
have been any updates for a while so I hope this is still relevant.

Index: pyreadline/console/ansi.py
===================================================================
--- pyreadline/console/ansi.py	(revision 3108)
+++ pyreadline/console/ansi.py	(working copy)
@@ -98,7 +98,7 @@
                     elif len(part) == 2 and "30" <= part <= "37": # set foreground color
                         attr.color = trtable[int(part)-30]
                     elif len(part) == 2 and "40" <= part <= "47": # set background color
-                        attr.color = trtable[int(part)-40]
+                        attr.background = trtable[int(part)-40]
                 continue
             n += len(chunk)
             if True:


-- 
DS



More information about the IPython-dev mailing list