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 (http://www.goffi.org/index.php?post/2010/08/19/Salut-%C3%A0-Toi-v0.0.3 - 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 multi-platform.

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 :)
Goffi

diff -r 1941f2d546cb urwid/util.py
--- a/urwid/util.py	Mon Jul 12 23:38:19 2010 +0200
+++ b/urwid/util.py	Fri Aug 20 17:44:13 2010 +0800
@@ -394,7 +394,7 @@
         attr, element = tm
         return _tagmarkup_recurse( element, attr )
     
-    if type(tm) not in (str, unicode):
+    if not isinstance(tm,basestring):
         raise TagMarkupException, "Invalid markup element: %r" % tm
     
     # text
_______________________________________________
Urwid mailing list
[email protected]
http://lists.excess.org/mailman/listinfo/urwid

Reply via email to