Joern Koerner | 6 Nov 14:45 2008
Picon

Download of urwid0.9.8 is broken


Error is:
Traceback (most recent call last):
  File "/usr/local/lib/python2.4/site-packages/Trac-0.12multirepos_r7590-
py2.4.egg/trac/web/api.py", line 375, in send_error
    data, 'text/html')
  File "/usr/local/lib/python2.4/site-packages/Trac-0.12multirepos_r7590-
py2.4.egg/trac/web/chrome.py", line 720, in render_template
    return stream.render(method, doctype=doctype)
  File "/usr/local/lib/python2.4/site-packages/Genshi-0.5.1-py2.4-linux-
i686.egg/genshi/core.py", line 179, in render
  File "/usr/local/lib/python2.4/site-packages/Genshi-0.5.1-py2.4-linux-
i686.egg/genshi/output.py", line 60, in encode
  File "/usr/local/lib/python2.4/site-packages/Genshi-0.5.1-py2.4-linux-
i686.egg/genshi/output.py", line 311, in __call__
  File "/usr/local/lib/python2.4/site-packages/Genshi-0.5.1-py2.4-linux-
i686.egg/genshi/output.py", line 753, in __call__
  File "/usr/local/lib/python2.4/site-packages/Genshi-0.5.1-py2.4-linux-
i686.egg/genshi/output.py", line 592, in __call__
  File "/usr/local/lib/python2.4/site-packages/Genshi-0.5.1-py2.4-linux-
i686.egg/genshi/output.py", line 698, in __call__
  File "/usr/local/lib/python2.4/site-packages/Genshi-0.5.1-py2.4-linux-
i686.egg/genshi/output.py", line 532, in __call__
  File "/usr/local/lib/python2.4/site-packages/Genshi-0.5.1-py2.4-linux-
i686.egg/genshi/core.py", line 283, in _ensure
  File "/usr/local/lib/python2.4/site-packages/Genshi-0.5.1-py2.4-linux-
i686.egg/genshi/core.py", line 283, in _ensure
  File "/usr/local/lib/python2.4/site-packages/Trac-0.12multirepos_r7590-
py2.4.egg/trac/web/chrome.py", line 780, in _strip_accesskeys
    for kind, data, pos in stream:
(Continue reading)

Ian Ward | 6 Nov 16:20 2008

Re: Download of urwid0.9.8 is broken

Joern Koerner wrote:
> Error is:
> Traceback (most recent call last):
>   File "/usr/local/lib/python2.4/site-packages/Trac-0.12multirepos_r7590-
...

Thanks Joern,  it should be working now.

I've been struggling with the multirepos branch of trac without really 
having enough time to solve all the issues I accidentally left the site 
in a broken state :-(
Joern Koerner | 7 Nov 09:27 2008
Picon

Installing 0.9.8.3 with Python 2.6 fails

Hi again!

I tried to setup the current urwid within Python 2.6, which fails with the 
following error:

$python setup.py install
Traceback (most recent call last):
  File "setup.py", line 29, in <module>
    import urwid
  File "/root/urwid/urwid/__init__.py", line 49, in <module>
    from listbox import *
  File "/root/urwid/urwid/listbox.py", line 85, in <module>
    class SimpleListWalker(MonitoredList, ListWalker):
  File "/usr/lib/python2.6/abc.py", line 76, in __new__
    cls = super(ABCMeta, mcls).__new__(mcls, name, bases, namespace)
TypeError: Error when calling the metaclass bases
    metaclass conflict: the metaclass of a derived class must be a (non-
strict) subclass of the metaclasses of all its bases
Friedrich Weber | 7 Nov 10:00 2008

Re: Installing 0.9.8.3 with Python 2.6 fails

Joern Koerner <koerner <at> in.tu-clausthal.de> writes:

> 
> Hi again!
> 
> I tried to setup the current urwid within Python 2.6, which fails with the 
> following error:
> 
> $python setup.py install
> Traceback (most recent call last):
>   File "setup.py", line 29, in <module>
>     import urwid
>   File "/root/urwid/urwid/__init__.py", line 49, in <module>
>     from listbox import *
>   File "/root/urwid/urwid/listbox.py", line 85, in <module>
>     class SimpleListWalker(MonitoredList, ListWalker):
>   File "/usr/lib/python2.6/abc.py", line 76, in __new__
>     cls = super(ABCMeta, mcls).__new__(mcls, name, bases, namespace)
> TypeError: Error when calling the metaclass bases
>     metaclass conflict: the metaclass of a derived class must be a (non-
> strict) subclass of the metaclasses of all its bases
> 

Hi, 

I had the same problem and fixed it by deriving MonitoredList from list, not
UserList. Additionally, I added some __hash__ methods.

All *seems* to work (did only test a few examples) and should also work with
python 2.5.
(Continue reading)

Ian Ward | 8 Nov 05:46 2008

Re: Installing 0.9.8.3 with Python 2.6 fails

Friedrich Weber wrote:
> 
> Hi, 
> 
> I had the same problem and fixed it by deriving MonitoredList from list, not
> UserList. Additionally, I added some __hash__ methods.
> 
> All *seems* to work (did only test a few examples) and should also work with
> python 2.5.

I've attached your patch to this email for posterity.

I'll try to find some time to make it work with python 2.3 and up and 
check it in.

Ian

_______________________________________________
Urwid mailing list
Urwid <at> lists.excess.org
http://lists.excess.org/mailman/listinfo/urwid
Andreas Klöckner | 14 Nov 08:49 2008
Picon

Patch for padding

Hi Ian,

I've attached a patch for Padding in hg. It seems that .w was renamed to 
._original_widget--this patch fixes a few more instances.

If this is nothing you can use, feel free to ignore it... :)

In any case, thanks for urwid!
Andreas

_______________________________________________
Urwid mailing list
Urwid <at> lists.excess.org
http://lists.excess.org/mailman/listinfo/urwid
Ian Ward | 14 Nov 21:20 2008

Re: Patch for padding

Thanks Andreas,

I will commit once my schedule returns to something more sane...

Ian

Andreas Klöckner wrote:
> Hi Ian,
> 
> I've attached a patch for Padding in hg. It seems that .w was renamed to 
> ._original_widget--this patch fixes a few more instances.
> 
> If this is nothing you can use, feel free to ignore it... :)
> 
> In any case, thanks for urwid!
> Andreas
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Urwid mailing list
> Urwid <at> lists.excess.org
> http://lists.excess.org/mailman/listinfo/urwid
Antonio Cavallo | 17 Nov 11:30 2008

Menu system

Hi,
I'm creating a menu based system with urwid.

Each page is going to have a header, a footer and
the main body: this has been done using a frame.

In the body I'd like to put a single
column of buttons vertically stacked and centered.

Is this possible? What's the best way? I've put something like this
in the frame's body (but it doesn't work):

view = urwid.Frame(page, header=header, footer=footer, focus_part='body')
buttons = []
buttons.append(urwid.AttrWrap(urwid.Button("A", pressed), 's0', 's1'))
buttons.append(urwid.AttrWrap(urwid.Button("B", pressed), 's0', 's1'))

items = urwid.SimpleListWalker(buttons)
listbox = urwid.ListBox(items)
padding = urwid.Padding(listbox, "center", 20)
view.set_body(self.padding)

It seems stuck and no interaction seems working.
Thank you in advance,
Antonio Cavallo
Ian Ward | 19 Nov 16:08 2008

Re: Menu system

Hello Antonio!

Antonio Cavallo wrote:
> Hi,
> I'm creating a menu based system with urwid.

Did you look at the "dialog.py" example?  It creates simple menus like 
the dialog (1) unix command.

> 
> Each page is going to have a header, a footer and
> the main body: this has been done using a frame.
> 
> In the body I'd like to put a single
> column of buttons vertically stacked and centered.
> 
> Is this possible? What's the best way? I've put something like this
> in the frame's body (but it doesn't work):
> 
> view = urwid.Frame(page, header=header, footer=footer, focus_part='body')
> buttons = []
> buttons.append(urwid.AttrWrap(urwid.Button("A", pressed), 's0', 's1'))
> buttons.append(urwid.AttrWrap(urwid.Button("B", pressed), 's0', 's1'))
> 
> items = urwid.SimpleListWalker(buttons)
> listbox = urwid.ListBox(items)
> padding = urwid.Padding(listbox, "center", 20)
> view.set_body(self.padding)
> 
> It seems stuck and no interaction seems working.
(Continue reading)

Ian Ward | 27 Nov 04:58 2008

excess.org server problems

I'm having some hardware problems with the excess.org server.   I'll 
post again when I have more information.

Ian

Gmane