Ian Ward | 6 Dec 2006 15:12
Favicon
Gravatar

Development Update

Greetings Urwid list,

It seems this is a busy time of year.  I have finally finished some web 
development that pulled my attention away from Urwid for the past few 
weeks and I'm now looking forward to working on the next release.

Before that happens I should have a chance to set up Trac for providing 
svn access to the source code, tracking issues and allowing interested 
users to update the documentation.

If anyone's interested in an Urwid IRC channel I could set one up too.

Ian
Rebecca Breu | 6 Dec 2006 16:03
Picon
Favicon

Re: Development Update

Zitat von Ian Ward <ian <at> excess.org>:

> It seems this is a busy time of year.  I have finally finished some web
> development that pulled my attention away from Urwid for the past few
> weeks and I'm now looking forward to working on the next release.

Every one is busy at the end of the year, aren't they? :)

That reminds me: I tried to rewrite some of the code you suggested in C.
That seems to work as long as I import the c-module into python. Becoming
jaunty, I wanted to write a fancy c-api for my c-module, as they suggest
it in the tutorial on python.org. But if I try to call a function via the c-api
I get a segmentation fault. :(

At the moment I don't have much time to look any closer at the bug. I only
know that calling my function is the reason, the code inside my function
is never reached. If anyone wants to have a look, here is a very simple example
that produces the same segmentation fault:

test.h:  http://paste.pocoo.org/show/219/
test.c:  http://paste.pocoo.org/show/218/

>
> If anyone's interested in an Urwid IRC channel I could set one up too.
>
> Ian

I like IRC. But I guess the time when I'm home from work, you guys from the
American continent are already asleep...

(Continue reading)

Ian Ward | 8 Dec 2006 03:26
Favicon
Gravatar

Re: Development Update

Rebecca Breu wrote:
> That reminds me: I tried to rewrite some of the code you suggested in C.
> That seems to work as long as I import the c-module into python. Becoming
> jaunty, I wanted to write a fancy c-api for my c-module, as they suggest
> it in the tutorial on python.org. But if I try to call a function via the c-api
> I get a segmentation fault. :(
> 
> At the moment I don't have much time to look any closer at the bug. I only
> know that calling my function is the reason, the code inside my function
> is never reached. If anyone wants to have a look, here is a very simple example
> that produces the same segmentation fault:

I had to install your module one of my site-packages directories because 
the default sys.path doesn't include the current directory when you're 
not in the python interpreter (and I didn't want to look up how to 
change sys.path from C).

Also, "test" is already a module in the standard library and on my 
system the standard library module gets imported instead of the one you 
wrote, so I renamed the module "rbtest" and it worked.

Ian

BTW, what do you need the C API for?  Isn't exporting functions to 
python good enough?
Ian Ward | 11 Dec 2006 06:33
Favicon
Gravatar

New Trac-based site

Ian Ward wrote:
> Before that happens I should have a chance to set up Trac for providing 
> svn access to the source code, tracking issues and allowing interested 
> users to update the documentation.

I've set up the new Trac-based site for Urwid development at the usual 
address:
http://excess.org/urwid/

You might need to refresh the page or wait for the DNS changes to propagate.

If you would like an account on the site please email me an .htaccess 
file with the account name and hashed password you would like (use the 
htpasswd program that comes with apache to generate it).  Or, if you 
prefer just email the name and password you would like.

Submitting tickets and editing most of the wiki pages can be done 
without an account on the site.

Ian
Rebecca Breu | 12 Dec 2006 14:29
Picon
Favicon

Re: Development Update

Zitat von Ian Ward <ian <at> excess.org>:

> Also, "test" is already a module in the standard library and on my
> system the standard library module gets imported instead of the one you
> wrote, so I renamed the module "rbtest" and it worked.

Yeah, what I have rewritten of utable.py works fine when imported into python
code. Even the test_urwid.py works with my new module (but I want to rethink
about the unicode stuff before showing my code to anyone...).

>
> BTW, what do you need the C API for?  Isn't exporting functions to
> python good enough?
>

Mmh, if I recall it right, some of the functions to be rewritten in C of uitl.py
call some of the functions to be rewritten in C of utable.py.

(My ambitious self says: At the moment dont' care for reasons, I just want the
damn thing to work. ;-)

Well, let's see what the next weekend brings.

So long,
Rebecca

_____________________________________________
> Urwid mailing list
> Urwid <at> lists.excess.org
> http://lists.excess.org/mailman/listinfo/urwid
(Continue reading)

Daniel Watkins | 13 Dec 2006 19:11
Picon

Re: Development Update

Ian Ward <ian <at> excess.org> writes:
> If anyone's interested in an Urwid IRC channel I could set one up too.
As an Urwid newbie, this would be an extremely helpful thing to have around, as 
I've had a couple of questions which are almost certainly trivial but 
undocumented (or unindexed in Google which, surely, is much the same :p).

Dan
Daniel Watkins | 13 Dec 2006 19:45
Picon

Header With Right and Left Aligned Element

As mentioned in my previous post, I'm an Urwid newbie (and this is one of the 
trivial questions).

I'm currently trying to put together a header which has a title in the top left 
and another piece of info in the top right.

At the moment I'm trying to use Columns, with little success. Is there a better 
way to do this?

Thanks,
Dan
Ian Ward | 13 Dec 2006 20:14
Favicon
Gravatar

Re: Header With Right and Left Aligned Element

Daniel Watkins wrote:
> As mentioned in my previous post, I'm an Urwid newbie (and this is one of the 
> trivial questions).
> 
> I'm currently trying to put together a header which has a title in the top left 
> and another piece of info in the top right.
> 
> At the moment I'm trying to use Columns, with little success. Is there a better 
> way to do this?

Columns is the best widget for what you're looking for.  If the text on 
the right or left is a fixed length then you can do something like:

header_widget = urwid.Columns([('fixed',10,left_widget), right_widget])

This way all the rest of the available width will be allocated to 
right_widget.

The only way to make right_widget appear on the right side at the moment 
is to use right-aligned text like:

right_widget = urwid.Text("I'm in the top right corner!", align="right")

In a future release I am planning to modify the Columns widget so that 
it can do right-alignment by detecting the width of the widgets it 
contains.. see: http://excess.org/urwid/ticket/11

Ian
Daniel Watkins | 13 Dec 2006 21:33
Picon

Re: Header With Right and Left Aligned Element

Ian Ward <ian <at> excess.org> writes:
> Columns is the best widget for what you're looking for.  If the text on 
> the right or left is a fixed length then you can do something like:
> ...
Thanks Ian, this works perfectly.
James Mills | 17 Dec 2006 06:19
Picon
Favicon
Gravatar

Applications of Urwid

Hi Everyone,

I just would like to ask:

Has anyone developed any usefull applications and tools
that use the Urwid library ? I would for one like to see
and/or use any available applications out there. I do
like curses-based apps (and being developed in Python 
is just a bonus!) :)

Perhaps it would be a good idea to have links to such
apps on the Urwid site ? Currently it's hard to find
anything usefull that's developed in Urwid. The GoogleBots
don't seem to come across anything :)

cheers
James

--

-- 
--
-"Problems are Solved by Method"
-
- James Mills <prologic <at> shortcircuit.net.au>
- HomePage: http://shortcircuit.net.au/~prologic/
- IRC: irc://shortcircuit.net.au#se

Please avoid sending me Word or PowerPoint attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html

Gmane