On 29/05/10 13:23, Ian Ward wrote:
> Tomás Touceda wrote on 2010-05-29 13:41:
>   
>> The project's in github.com/chiiph/pim/ <http://github.com/chiiph/pim/>
>>
>> As you can see, the UI is in curses, but since I'm having a lot of
>> problems with key combinations, I saw that Urwid has that figured out
>> really nice.
>>
>> The problem I'm experiencing is that I need a simple UI layout. Just
>> like vim or emacs: a big text widget where the editing takes place, and
>> at the bottom 2 other text widgets of exactly 1 row height, one for
>> status, and one to act as a command line.
>>     
> You could use something like
>
> Frame(body=Filler(edit_area), footer=Pile([status_line, command_line]))
>
> This assumes edit_area is a text widget and needs to have blank lines
> inserted below it to fill the available space.
>   
Ok. What I've done right now is to have a listbox and I fill with as
many \n as are needed to get the status and command line at the bottom.

[snip]

> Another option if you already have a working curses interface is to just
> use Urwid's input handling code.  Look at urwid/curses_display.py and
> urwid/escape.py.
>   
Yes, I have a working curses UI, I just have to figure out some little
details, but it seems it's working.

The main problem is having a sane way to check for keyboard input. I
think I'll try this before continuing with the all-urwid example.

There's one thing though... I'll set my code to don't initialize
anything, and let urwid.curses_diaplay.start() do the magic. I use the
stop method, but the terminal after the program's terminated doesn't
come back to normality, I have to reset it. Any ideas how can I solve this?

Thanks a lot,
Tomas

Attachment: signature.asc
Description: OpenPGP digital signature

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

Reply via email to