[Urwid] Documentation or example on how the Signals class is used?

Dominic LoBue dom.lobue at gmail.com
Sun Jun 28 01:24:47 EDT 2009


Thanks a lot. I figured out how to use your Signals class since I sent
that message by creating some small simple examples and reading
through the code, and I'm loving it. Brilliant implementation. Gave me
an idea on how to create a buffer manager for my application :)

On the subject of bettering documentation, could you do a writeup on
the site on how urwid's caching works? I'd like to be able to work
with the caching system from the start, rather than find out down the
road I'm creating more work for myself (and my cpu) then was
necessary.

Also I found a bug in the monitored list class. I was unable to sent
keyword arguments to sort. Here's a diff with the fix:
diff --git a/urwid/util.py b/urwid/util.py
index 1b96565..48243fd 100644
--- a/urwid/util.py
+++ b/urwid/util.py
@@ -951,8 +951,8 @@ class Signals(object):


 def _call_modified(fn):
-       def call_modified_wrapper(self, *args):
-               rval = fn(self, *args)
+       def call_modified_wrapper(self, *args, **kwargs):
+               rval = fn(self, *args, **kwargs)
                self._modified()
                return rval
        return call_modified_wrapper


On Sat, Jun 27, 2009 at 8:36 AM, Ian Ward<ian at excess.org> wrote:
> Dominic LoBue wrote:
>> Ian,
>>
>> Are there any plans on writing up any documentation on how the Signals
>> class is supposed to work? Fail that, are there any examples where I
>> can see the class used more extensively? The doc strings for ListBox
>> and SimpleListWalker that suggest using Signals don't explain how to
>> properly use them at all.
>
> You're right, the docs are poor in that area.  In the development
> release the docstrings for the Button class give some usage examples.
>
> Instead of describing usage here I have just added some docstrings to
> signals.py in the development code:
> http://excess.org/urwid/changeset/193%3Ae1bc281ac88e
>
> Ian
>
>
> _______________________________________________
> Urwid mailing list
> Urwid at lists.excess.org
> http://lists.excess.org/mailman/listinfo/urwid
>
>




More information about the Urwid mailing list