[Urwid] SàT: XMPP client with urwid frontend + smalls remarks about urwid

goffi goffi at goffi.org
Fri Aug 20 05:52:17 EDT 2010

Hi there,

I've just release SàT 0.0.3 which is a XMMP client based on a 
daemon/frontend architecture, communicating by DBus.
The idea is to have everything done in the daemon, and the frontend only 
manage the view.
Currently the following frontends exist:
- Wix (WxWidget): GUI
- Primitivus (Urwid): Console interface
- Jp: CLI
A Web and Qt (Kde ?) frontend are also planed.

The daemon is based on Twisted/Wokkel. The sources and some screenshots 
are available on my website 
- in french sorry - or http://www.goffi.org/index.php?download/35 for 
the direct download). Note that the project is *not yet intended for 
end-user*, and the installation is currently a bit complex (but there is 
step-by-step how-to in INSTALL file). The project will hopefully be 
usable for end-user around the end of the year, and should be 

I talk about this here because my previously-ncurses based console 
interface now uses Urwid, and thanks to you I could do stuffs quickly 
and efficiently. I have made some widgets which can eventually be useful 
to others (advanced edit, tabs container, or file selection dialog box), 
you can check in frontends/primitivus directory, you will probably be 
interested by custom_widgets.py and files_management.py. Everything is 
under GPL v3

I have two small remarks:
- except if I have missed something, there is nothing to dynamically 
change Colums and Pile widget, I had to manually change widget_list and 
column_types, which can be broken if the Urwid code change. I think a 
few methods to add/remove dynamically widget should be useful
- I heavily use DBus, and dbus return dbus.String objects, which are 
subclasses of unicode. But Urwid do a strict type comparison, and I have 
a TagMarkupException when trying, for e.g. to create an urwid.Text. 
Using isinstance can fix it. As suggested on IRC chan, you can find a 
small patch attached.

Here what I have without path:

In [1]:  import urwid
In [2]: import dbus
In [3]: toto = dbus.String('toto')
In [4]: txt_wid = urwid.Text(toto)
 > ...blah...
 > TagMarkupException: Invalid markup element: dbus.String(u'toto')

With the patch it works.
Note: there is an other strict type check in widget.py (l.910), but the 
following unicode conversion make it working.

Thanks again for the good work, and enjoy :)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: non_strict_type_check.patch
Type: text/x-patch
Size: 409 bytes
Desc: not available
Url : http://lists.excess.org/pipermail/urwid/attachments/20100820/267b0e49/attachment.bin 

More information about the Urwid mailing list