Florian Festi | 5 Feb 2007 18:14
Picon
Favicon

Enhancements for Urwid

Hi!

We are currently looking for a text mode widget set and stumbled
across urwid. Urwid looks very promissing but as we want to
resemble out Gtk tools in text mode we miss some features:

Widgets:
  * ScrollBar (h/v)
  * ScrolledWindow (ListBox + ScrollBar/h/h+v)
  * Paned (h/v)
  * VerticalSeparator
  * Menu
  * NoteBook
  * TreeView
  * Window
  * Dialog
  * ComboBox
  * ComboEntry
  * Edit
   - have indicators for scrolled out text ('<' '>')
   - have a more GUI-like variant with constant width editing field

Other features:
  * Stacking: Having a sane way of putting widgets on top of each
    other. These needs so be on a global level to avoid limitations
    as in Overlay.
  * Sensitivity: Disable parts of the UI depended on other selections
  * (In)Visibility: Hide parts of the UI depended on other selections
  * Theming: a global way to set coloring and text graphics chars
    and make all widgets of one type look the same. This may include
(Continue reading)

Ian Ward | 5 Feb 2007 20:45
Favicon
Gravatar

Re: Enhancements for Urwid

Florian Festi wrote:
> We are currently looking for a text mode widget set and stumbled
> across urwid. Urwid looks very promissing but as we want to
> resemble out Gtk tools in text mode we miss some features:

Creating a text interface that resembles a GUI was never my intent when 
writing Urwid, so I'm sure there are many things missing :-)

> Widgets:
>  * ScrollBar (h/v)
see http://excess.org/urwid/ticket/10

>  * ScrolledWindow (ListBox + ScrollBar/h/h+v)
related to http://excess.org/urwid/ticket/9

I would like the scroll bars and scrolling regions to stay as separate 
widgets so that their placement isn't fixed (you might want to put some 
other widget between them, for example)

>  * Paned (h/v)
I think you can do something like this with Columns and Pile widgets. 
If not, could you be more specific?

>  * VerticalSeparator
see http://excess.org/urwid/browser/urwid/trunk/graph.py#L292
the "vline" widget is being used as a vertical separator

>  * Menu
related to http://excess.org/urwid/ticket/6
and http://excess.org/urwid/browser/contrib/trunk/rbreu_menus.py
(Continue reading)

Florian Festi | 6 Feb 2007 14:33
Picon
Favicon

Re: Enhancements for Urwid

Hi!

This is all great news.

I just saw your ticket tracker after sending my mail. So I could have 
reduced my list to "All tracker items plus some others"

I won't answer every single issue as most of them are already on "Go" and we 
will address details during implementation.

So how do we proceed from here? Am fine with sending in patches or python 
file for new widgets. But how are we going to do further planning. I 
personally prefer wiki pages over posting based solutions like mail or 
tracker. But that's up to you.

We also should meet in IRC. When are you reachable there? We are normally 
working around 8:00-18:00 UTC but other times of day are fine for me too (as 
long as its not daily) with extending into the evening is easier than 
getting up early ;)=

>>  * Paned (h/v)
> I think you can do something like this with Columns and Pile widgets. If 
> not, could you be more specific?
The difference to Columns and Pile is that the user can change the widths 
interactively. So they'd be subclasses of Columns and Pile.

> related to http://excess.org/urwid/ticket/6
> As with the Menu item above, this will be a lot easier once some canvas 
> changes I'm working on right now are released.
I am already curious. We'll urgently need better overlaying support. Are 
(Continue reading)

Florian Festi | 6 Feb 2007 16:30
Picon
Favicon

user_data param for call backs

Hi!

For callbacks it would be handy to be able to pass additional data.
This patch adds this for Button, CheckBox and RadioButton. The additional 
param is ommited if the default (None) is not changed to remain compatible 
with current behaviour.

Florian
_______________________________________________
Urwid mailing list
Urwid <at> lists.excess.org
http://lists.excess.org/mailman/listinfo/urwid
Florian Festi | 6 Feb 2007 17:53
Picon
Favicon

Console fonts

Hi!

I saw BigText and liked the idea. But I had pity on the small number of 
chars supported. So I tried a bit of coding over the weekend...

As we really don't need BigText and I have a lot of other stuff to do I just 
send it to the list as it is right now.

Have fun

	Florian
Attachment (bigtext.py): text/x-python, 6232 bytes
Attachment (consolefont.py): text/x-python, 8 KiB
_______________________________________________
Urwid mailing list
Urwid <at> lists.excess.org
http://lists.excess.org/mailman/listinfo/urwid
Ian Ward | 8 Feb 2007 02:43
Favicon
Gravatar

Re: Enhancements for Urwid

Florian Festi wrote:
> 
> So how do we proceed from here? Am fine with sending in patches or 
> python file for new widgets. But how are we going to do further 
> planning. I personally prefer wiki pages over posting based solutions 
> like mail or tracker. But that's up to you.

I will try using the Wiki pages you have started at 
http://excess.org/urwid/wiki/Development

> We also should meet in IRC. When are you reachable there? We are 
> normally working around 8:00-18:00 UTC but other times of day are fine 
> for me too (as long as its not daily) with extending into the evening is 
> easier than getting up early ;)=

That's a little early for me, but I should be there from time to time. 
If you feel like having a "meeting" that can be arranged.

Perhaps I should start doing my hacking early in the morning (and learn 
a little German :-)

>> related to http://excess.org/urwid/ticket/6
>> As with the Menu item above, this will be a lot easier once some 
>> canvas changes I'm working on right now are released.
> I am already curious. We'll urgently need better overlaying support. Are 
> your changes already in trunk?

Partially.  I am going to extend the CompositeCanvas class to have a 
pointer to the widget that drew it, and a list of the canvases it 
contains.
(Continue reading)

Florian Festi | 8 Feb 2007 19:30
Picon
Favicon

Curses fix for lower right corner

gmane.comp.lib.urwid
_______________________________________________
Urwid mailing list
Urwid <at> lists.excess.org
http://lists.excess.org/mailman/listinfo/urwid
Ian Ward | 8 Feb 2007 20:18
Favicon
Gravatar

Re: Curses fix for lower right corner

Florian Festi wrote:
> +			nr = 0

s/nr/y and I'll merge it.

Ian
Ian Ward | 23 Feb 2007 21:11
Favicon
Gravatar

Development update: performance, incompatibilities

The latest version of Urwid in subversion now incorporates a new caching 
mechanism and a compiled C version of some string utilities from Rebecca 
Breu.

The performance has really improved since the last stable release 
(0.9.7.2).  Here are the results I get when comparing the two versions 
running the benchmark programs in contrib:

: reduction in running time / speed improvement
bench_1.py (tour):      41% /  70%
bench_2.py (bigtext):   82% / 450%
bench_3.py (calc):      56% / 125%
bench_4.py (graph):     73% / 268%

Some further improvements are still possible, but the latest version is 
very close to what will be released as 0.9.8.

Now to the changes.

All the standard widgets in Urwid now cache the canvas they produce from 
their render() functions.  The caching is done using a new CanvasCache 
class.  The CanvasCache will hold on to a canvas as long as there is 
still a reference to it.  The Screen objects in raw_display and 
curses_display hold on to a reference to the last screen rendered, 
allowing the cache to work without modifying your applications.

However, caching canvases requires that we know when a widget has 
changed, so there are a couple changes to Urwid's interface that I 
couldn't avoid.

(Continue reading)


Gmane