[Urwid] suggestion and guidelines

Rebecca Breu rebecca at rbreu.de
Mon Aug 13 16:10:25 EDT 2007


Quoting Pedro Jorge Caridade <caridade at qta.qui.uc.pt>:

> created two empty (actually with one empty element) listboxes. I was
> expecting (again sorry if i going to say something really stupid) that
> when I call "update_readings()" function the listbox contents should be
> updated. But nothing happens. What am I doing wrong? What have I missed?

Line 94 (in update_readings) should be

self.queue_widget.w = urwid.AttrWrap(urwid.ListBox(#

instead of

self.queue_widget.body =


Just a note on your code: You are using spaces *and* tabs for indentation.
You should never mix spaces and tabs for indentation, that could lead to
misterious indentation errors. The python styleguide suggests using 4 spaces.


Yours,
Rebecca





More information about the Urwid mailing list