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

David Shilvock davels@telus....
Wed Dec 17 23:06:48 CST 2008


On Wed, 17 Dec 2008 20:02:18 +0100 Jörgen Stenarson <jorgen.stenarson@bostream.nu> wrote:
> David Shilvock skrev:
>> 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.
>> 
> David,
>
> thanks for your patch. I think one of the reasons you do not see any 
> activity is because we moved the code over to launchpad 
> (https://code.launchpad.net/pyreadline). 

Cool.  I grabbed a copy of trunk to play with.  Noticed that you already
updated the wiki with a link to the bzr repo.  You probably meant
"lp:pyreadline" instead of "lp:ipython".

> I should go over the old wiki pages and update them with correct
> references. If you feel like helping out the docs really need
> attention. If there are any other questions or requests feel free to ask
> them on list.
>
> There are currently two branches trunk which have seens a few bugfixes 
> since we moved it over. And the refactor branch on which a lot of 
> cleaning up and simplifying of the code base has been done. However
> the activity has been intermittent. My goal is to fold back the 
> refactoring into trunk and then start to work on getting pyreadline to 
> python 3.0.
>
> /Jörgen

BTW it looks like you made a little Copy/Paste error when you incorporated
my patch.  Here's the fix.

=== modified file 'pyreadline/console/ansi.py'
--- pyreadline/console/ansi.py  2008-12-17 18:27:56 +0000
+++ pyreadline/console/ansi.py  2008-12-18 04:26:31 +0000
@@ -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.backgroundcolor = 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