On Sat, Jun 30, 2012 at 12:50 PM, Ian Ward <[email protected]> wrote:

> See the attached example, it should be enough get you started.


Hi Ian!

That code is exactly what I was looking for.  Thanks!

The script had a small typo that was causing it to fail, but the code is so
clear and simple that I had no trouble fixing it.  All I had to do was
change a couple of lines, from

*def cols(a, b, c):
    return urwid.Columns([
        (10, urwid.Text(a)),
        (10, urwid.Text(b)),
        urwid.Text(c, wrap='clip')])
*
to

*def cols(a, b, c):
    return urwid.Columns([
        ('fixed', 10, urwid.Text(a)),
        ('fixed', 10, urwid.Text(b)),
        urwid.Text(c, wrap='clip')])
*

After that, it worked beautifully.  Thanks!!!


> It's the sort of thing I've been planning to add to the tutorial because
> many people build interfaces like this.
>
> I'm sorry you find the documentation confusing. We are working on it
> though!  Detailed feedback about things you find confusing is helpful.
>

Actually, I think the documentation for urwid is very good.  In retrospect
I think what stumped me was that the docs present urwid as a fairly
full-blown windowed UI system, which is far more than I needed.  I kept
looking in vain for documentation devoted to the simplest possible
text-based UIs, such as the one I described in my initial message, or ones
consisting of a sequence of menus of numbered choices for the user to
choose from, or a pager like less(1).  I would imagine that the majority of
programmers looking at the urwid docs for the first time urwid are doing so
because they want to implement such very simple interfaces.

Maybe one way to look at the situation is that the current docs focus
primarily on "advanced text-based interfaces with urwid".  What's missing
is a cookbook-style section devoted to the *simplest* text-based widgets.

kj
_______________________________________________
Urwid mailing list
[email protected]
http://lists.excess.org/mailman/listinfo/urwid

Reply via email to