Goffi | 12 Jan 21:19 2011

Urwid's SàT extensions: some widgets for Urwid

Hi there,

As I promised some times ago (cf archives in august 2010), I splitted 
the widgets made for "Salut à Toi", my multi-frontends XMPP client, into 
a separate project.
As previously asked, I have released "urwid-satext" under LGPL licence.
I have also made a small example to show how to use the FileDialog widget.

To install it, just use pip as root:

# pip install "ftp://ftp.goffi.org/urwid-satext/urwid_satext.tar.bz2"

It's not on PyPi yet, but I will probably drop it there at some point.

You will find the widgets available and others informations on the 
dedicated wiki: http://wiki.goffi.org/wiki/Urwid-satext (available in 
french and english).

You can also have a look at my XMPP client if you want to see the 
widgets in action: http://wiki.goffi.org/wiki/Salut_%C3%A0_Toi

I would appreciate any help to improve this. A bugzilla is available at 
http://bugs.goffi.org .

enjoy
Goffi
goffi | 25 Jan 16:24 2011

Re: Urwid's SàT extensions: some widgets for Urwid

The package is now on pypi...
No feedback ?

On 12/01/2011 21:19, Goffi wrote:
> Hi there,
>
> As I promised some times ago (cf archives in august 2010), I splitted
> the widgets made for "Salut à Toi", my multi-frontends XMPP client, into
> a separate project.
> As previously asked, I have released "urwid-satext" under LGPL licence.
> I have also made a small example to show how to use the FileDialog widget.
>
> To install it, just use pip as root:
>
> # pip install "ftp://ftp.goffi.org/urwid-satext/urwid_satext.tar.bz2"
>
> It's not on PyPi yet, but I will probably drop it there at some point.
>
> You will find the widgets available and others informations on the
> dedicated wiki: http://wiki.goffi.org/wiki/Urwid-satext (available in
> french and english).
>
> You can also have a look at my XMPP client if you want to see the
> widgets in action: http://wiki.goffi.org/wiki/Salut_%C3%A0_Toi
>
> I would appreciate any help to improve this. A bugzilla is available at
> http://bugs.goffi.org .
>
> enjoy
> Goffi
(Continue reading)

Ian Ward | 26 Jan 03:38 2011

Re: Urwid's SàT extensions: some widgets for Urwid

goffi wrote on 2011-01-25 10:24 :
> The package is now on pypi...
> No feedback ?

Hi Goffi,

I'm very happy to see this library.  I always hoped people would build
and share their own Urwid widget sets.

One thing I've noticed while developing this library is that almost the
only time I hear from my users is when I've broken something,  "I love
your library, there's just one problem..." :-)

Nice to see there's a package version now.

Ian
mammar | 26 Jan 06:53 2011
Picon

Re: Urwid's SàT extensions: some widgets for Urwid

Hi Ian,



From the past 4 months i am using urwid and its really a superb library for console application development.

I am more than willing to contribute but i have little knowledge of python. So, if you are anyone other can guide/mentor me then i am ready.

Keep doing great work. 


Regards,


On Wed, Jan 26, 2011 at 7:38 AM, Ian Ward <ian <at> excess.org> wrote:
goffi wrote on 2011-01-25 10:24 :
> The package is now on pypi...
> No feedback ?

Hi Goffi,

I'm very happy to see this library.  I always hoped people would build
and share their own Urwid widget sets.

One thing I've noticed while developing this library is that almost the
only time I hear from my users is when I've broken something,  "I love
your library, there's just one problem..." :-)

Nice to see there's a package version now.

Ian

_______________________________________________
Urwid mailing list
Urwid <at> lists.excess.org
http://lists.excess.org/mailman/listinfo/urwid

_______________________________________________
Urwid mailing list
Urwid <at> lists.excess.org
http://lists.excess.org/mailman/listinfo/urwid
goffi | 26 Jan 14:42 2011

Re: Urwid's SàT extensions: some widgets for Urwid

Well,

developpers probably don't give feedback directly to you, but I often 
hear a lot of compliments about Urwid, and IMHO it deserve it :)
For my own experience, Urwid saved me a lot of time: my former console 
interface for my XMPP client was done using the standard python ncurses 
library, and it was really a pain to include dbus and manage everything; 
I had made a new one functionnaly equivalent really quickly thanks to 
Urwid, and now it's easy to extand.

So thanks for the good work ^^

On 26/01/2011 03:38, Ian Ward wrote:
> One thing I've noticed while developing this library is that almost the
> only time I hear from my users is when I've broken something,  "I love
> your library, there's just one problem..." :-)
>
> Nice to see there's a package version now.
>
> Ian
>
> _______________________________________________
> Urwid mailing list
> Urwid <at> lists.excess.org
> http://lists.excess.org/mailman/listinfo/urwid
Karsten Schulz | 26 Jan 19:58 2011
Picon
Picon

Re: Urwid's SàT extensions: some widgets for Urwid

Hi Ian,

Am 26.01.2011 um 03:38 schrieb Ian Ward:
> One thing I've noticed while developing this library is that almost the
> only time I hear from my users is when I've broken something,  "I love
> your library, there's just one problem..." :-)

just to let you know: I love urwid. It's a lib, which made and makes my life easier :)

I've implemented several console programs with a urwid user interface, which are in productive use! One
example is mentioned in my (german) blog at <http://www.linux-systemhaus.de/blog/files/74092d9125b4fef95c9c77c211bd426e-42.html>

Thank you very much for everything Ian!

Thank you!
Karsten
Paul Waring | 27 Jan 21:04 2011
Picon

Printing below existing text

I'm trying to build a simple console application using urwid which 
performs the following task:

1. Print menu ("Menu: ")
2. User presses a letter or number key (everything else can be discarded)
3. Print some text based on key pressed (quit if 'q')
4. GOTO 1

At the moment I've got the following code, largely taken from the tutorial:

import urwid

def unknown_input(input):
   if input in ('q', 'Q'):
     raise urwid.ExitMainLoop()
   elif input in ('l', 'L'):
     txt.set_text('list')
   else:
     txt.set_text('unknown option')

txt = urwid.Text('Menu: ')
fill = urwid.Filler(txt, 'top')

loop = urwid.MainLoop(fill, unhandled_input=unknown_input)
loop.run()

This *almost* does what I want, except txt.set_text() overwrites the one 
line of text every time, whereas I want to print below the existing text 
to get output like the following:

Menu: L
"You pressed L"
Menu: q
<quit>

I could just use txt.set_text(txt.get_text() + 'new text') but I suspect 
that would end up creating a large string eventually and I don't care 
about content once it has disappeared off the top of the screen.

Should I be using a different object instead of Text? I don't want users 
to be able to scroll back so a ListBox doesn't really fit (users can 
only press a key at the menu).

Thanks,

Paul

--

-- 
Paul Waring
http://www.pwaring.com
goffi | 28 Jan 00:38 2011

Re: Printing below existing text

Hey Paul,

you can use a listbox for that. Look at the tutorial part 2.3 "Modifying 
ListBox Content", it actually do what you want

cheers

On 27/01/2011 21:04, Paul Waring wrote:
> I'm trying to build a simple console application using urwid which
> performs the following task:
>
> 1. Print menu ("Menu: ")
> 2. User presses a letter or number key (everything else can be discarded)
> 3. Print some text based on key pressed (quit if 'q')
> 4. GOTO 1
>
> At the moment I've got the following code, largely taken from the tutorial:
>
> import urwid
>
> def unknown_input(input):
>     if input in ('q', 'Q'):
>       raise urwid.ExitMainLoop()
>     elif input in ('l', 'L'):
>       txt.set_text('list')
>     else:
>       txt.set_text('unknown option')
>
> txt = urwid.Text('Menu: ')
> fill = urwid.Filler(txt, 'top')
>
> loop = urwid.MainLoop(fill, unhandled_input=unknown_input)
> loop.run()
>
> This *almost* does what I want, except txt.set_text() overwrites the one
> line of text every time, whereas I want to print below the existing text
> to get output like the following:
>
> Menu: L
> "You pressed L"
> Menu: q
> <quit>
>
> I could just use txt.set_text(txt.get_text() + 'new text') but I suspect
> that would end up creating a large string eventually and I don't care
> about content once it has disappeared off the top of the screen.
>
> Should I be using a different object instead of Text? I don't want users
> to be able to scroll back so a ListBox doesn't really fit (users can
> only press a key at the menu).
>
> Thanks,
>
> Paul
>
Paul Waring | 28 Jan 11:04 2011
Picon

Re: Printing below existing text

On 27/01/11 23:38, goffi wrote:
> you can use a listbox for that. Look at the tutorial part 2.3 "Modifying
> ListBox Content", it actually do what you want

It doesn't do what I want, at least not in 2.3:

"Old values may be changed and the responses will be updated when you 
press ENTER"

I don't want users to be able to scroll back - they are not allowed to 
change previous entries and can only use the current menu.

--

-- 
Paul Waring
http://www.pwaring.com
Ian Ward | 28 Jan 14:32 2011

Re: Printing below existing text

Paul Waring wrote on 2011-01-28 05:04:
> On 27/01/11 23:38, goffi wrote:
>> you can use a listbox for that. Look at the tutorial part 2.3 "Modifying
>> ListBox Content", it actually do what you want
> 
> It doesn't do what I want, at least not in 2.3:
> 
> "Old values may be changed and the responses will be updated when you 
> press ENTER"
> 
> I don't want users to be able to scroll back - they are not allowed to 
> change previous entries and can only use the current menu.

You could change the old Edit widgets to Text widgets.  That way the
user could still scroll back up if they wanted to, but can't change
anything.

Ian

Gmane