Ian Ward | 2 Dec 23:15 2008

Re: Scrolling trouble

Andreas Klöckner wrote:
> Hi Ian, all,
> 
> If you run the attached script with 'python pudb.py pudb.py' and hit 'h', 
> you'll see a help screen that's supposed to be scrollable. For me, it scrolls 
> just a little bit, but doesn't show all the text it's supposed to show.
> 
> Looks like a ListBox bug...
> 
> Andreas
> 
> PS: I'm attaching a bunch of fixes I've made against the hg version. This 
> includes the prior patch.

Andreas,

pudb.py looks exactly like something I was hoping to have time to write
myself.  Would you like me to distribute it with Urwid?

Your patches look fine.  I will include them in my repo (when it's back
online)

I have had some issues with scrolling long unselectable widgets that I
haven't fixed yet, this is likely what you're running into.  A simple
workaround is to break your text into multiple widgets, but the proper
thing to do is to add a test case to test_urwid.py with a really long
widget.  There are lots and lots of listbox test cases, but this looks
like one I missed.

Ian
(Continue reading)

Andreas Klöckner | 3 Dec 22:24 2008
Picon

Re: Scrolling trouble

On Dienstag 02 Dezember 2008, Ian Ward wrote:
> Andreas Klöckner wrote:
> > Hi Ian, all,
> >
> > If you run the attached script with 'python pudb.py pudb.py' and hit 'h',
> > you'll see a help screen that's supposed to be scrollable. For me, it
> > scrolls just a little bit, but doesn't show all the text it's supposed to
> > show.
> >
> > Looks like a ListBox bug...
> >
> > Andreas
> >
> > PS: I'm attaching a bunch of fixes I've made against the hg version. This
> > includes the prior patch.
>
> Andreas,
>
> pudb.py looks exactly like something I was hoping to have time to write
> myself.  Would you like me to distribute it with Urwid?

It's far from done. Feel free to distribute it as is, though. If I get some 
time to work more on it, I'll send updates.

> I have had some issues with scrolling long unselectable widgets that I
> haven't fixed yet, this is likely what you're running into.  A simple
> workaround is to break your text into multiple widgets, but the proper
> thing to do is to add a test case to test_urwid.py with a really long
> widget.  There are lots and lots of listbox test cases, but this looks
> like one I missed.
(Continue reading)

Ian Ward | 7 Dec 16:18 2008

Re: excess.org server problems

Ian Ward wrote:
> Ian Ward wrote:
>> I'm having some hardware problems with the excess.org server.   I'll 
>> post again when I have more information.
> 
> The problem is hdd-controller related in a server in another city, and 
> I've got two newborns to take care of so it will be another few days at 
> least before the site is restored.

I've put up an old backup version of excess.org (the urwid trac site in 
particular is out of date and still pointing at a svn repo) but I have 
updated the hg repo at:

   https://excess.org/hg/urwid/

The latest version of the urwid trac site should be available in about a 
week when I have access to the hardware.

Ian
Deniz Dogan | 14 Dec 14:58 2008
Picon

Metaclass error

Hello. When trying to install the latest hg version of Urwid, I get this:

deniz <at> stalin:~/sources/urwid% python setup.py install
Traceback (most recent call last):
  File "setup.py", line 31, in <module>
    import urwid
  File "/home/deniz/sources/urwid/urwid/__init__.py", line 49, in <module>
    from listbox import *
  File "/home/deniz/sources/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

There was a patch for this, which I couldn't get to work. When will
this be fixed? As you can see in the error message, I'm using Python
2.6.

Deniz
Ian Ward | 14 Dec 19:01 2008

Re: Metaclass error

Hi Deniz,

Friedrich Weber posted a patch for this problem, but I haven't had a 
chance to make sure it doesn't break older versions of Python:

http://www.mail-archive.com/urwid <at> lists.excess.org/msg00297.html

Ian

Deniz Dogan wrote:
> Hello. When trying to install the latest hg version of Urwid, I get this:
> 
> deniz <at> stalin:~/sources/urwid% python setup.py install
> Traceback (most recent call last):
>   File "setup.py", line 31, in <module>
>     import urwid
>   File "/home/deniz/sources/urwid/urwid/__init__.py", line 49, in <module>
>     from listbox import *
>   File "/home/deniz/sources/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
> 
> There was a patch for this, which I couldn't get to work. When will
> this be fixed? As you can see in the error message, I'm using Python
> 2.6.
> 
(Continue reading)

Deniz Dogan | 14 Dec 19:05 2008
Picon

Re: Metaclass error

I tried that patch and as I wrote in my original e-mail, it didn't
work for me. "patch" complains about not finding the target file.
Could you tell me exactly how to execute the patch and where to have
my PWD when doing so?

Deniz

2008/12/14 Ian Ward <ian <at> excess.org>:
> Hi Deniz,
>
> Friedrich Weber posted a patch for this problem, but I haven't had a
> chance to make sure it doesn't break older versions of Python:
>
> http://www.mail-archive.com/urwid <at> lists.excess.org/msg00297.html
>
> Ian
>
> Deniz Dogan wrote:
>> Hello. When trying to install the latest hg version of Urwid, I get this:
>>
>> deniz <at> stalin:~/sources/urwid% python setup.py install
>> Traceback (most recent call last):
>>   File "setup.py", line 31, in <module>
>>     import urwid
>>   File "/home/deniz/sources/urwid/urwid/__init__.py", line 49, in <module>
>>     from listbox import *
>>   File "/home/deniz/sources/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)
(Continue reading)

Ian Ward | 14 Dec 19:19 2008

Re: Metaclass error

The patch has file names like a/urwid/monitored_list.py, so you should 
be able to apply it from the directory containing the "urwid" directory 
with a command like:

patch -p1 < patchfile

-p1 removes one level of the file path, so patch will look for 
urwid/monitored_list.py to patch starting from the current directory.

HTH
Ian

Deniz Dogan wrote:
> I tried that patch and as I wrote in my original e-mail, it didn't
> work for me. "patch" complains about not finding the target file.
> Could you tell me exactly how to execute the patch and where to have
> my PWD when doing so?
> 
> Deniz
> 
> 2008/12/14 Ian Ward <ian <at> excess.org>:
>> Hi Deniz,
>>
>> Friedrich Weber posted a patch for this problem, but I haven't had a
>> chance to make sure it doesn't break older versions of Python:
>>
>> http://www.mail-archive.com/urwid <at> lists.excess.org/msg00297.html
>>
>> Ian
>>
(Continue reading)

Christian Scharkus | 27 Dec 10:58 2008

urwid and twisted

Hi everybody.

I'm currently writing a small chatclient based upon twisted in a mvc pattern and decided (because of the python-curses module not supporting clean utf-8 output) to write the userinterface with urwid. I've found a little example for a irc-client in urwid using the same method to join with twisted I used with curses (register with the reactor using the addReader-method) and began to implement input at first. In my humble opinion the code should work but it isn't. I discovered the twisted main loop in urwid too but have no idea how to make use of it.

Here the code and the exception
http://codepad.org/0Hlvmp1b

Thanks for your help

Christian Scharkus

_______________________________________________
Urwid mailing list
Urwid <at> lists.excess.org
http://lists.excess.org/mailman/listinfo/urwid
James Mills | 28 Dec 23:33 2008
Picon

Re: urwid and twisted

On Sat, Dec 27, 2008 at 7:58 PM, Christian Scharkus
<mail.sensenmann <at> googlemail.com> wrote:
> Hi everybody.

Hi :)

> I'm currently writing a small chatclient based upon twisted in a mvc pattern
> and decided (because of the python-curses module not supporting clean utf-8
> output) to write the userinterface with urwid. I've found a little example
> for a irc-client in urwid using the same method to join with twisted I used
> with curses (register with the reactor using the addReader-method) and began
> to implement input at first. In my humble opinion the code should work but
> it isn't. I discovered the twisted main loop in urwid too but have no idea
> how to make use of it.
>
> Here the code and the exception
> http://codepad.org/0Hlvmp1b

I really strongly recommend that you not use
Twisted for your application, but rather use
circuits (1) instead. Why ? It's simpler, easier
to develop with and far more flexible.

Please check it out, I'm sure if you should be
sufficiently experienced enough to port your
urwid application to use circuits vs. twisted.

I might just write up a simple irc client when
I get home from work today to demonstrate
how simple it is.

cheers
James

PS: Threads are evil :)
Christian Scharkus | 29 Dec 08:28 2008

Re: urwid and twisted

Hi.

Thanks for your answer ... yes threads are evil :D
Funny thing that you recommend the change of our framework because we just changed to urwid because the curses-module is not capable of utf-8. However we would have to rewrite our protocoll completly. And in fact it's working know with some small dirty hacks and the curses_display (may theres just a problem with raw_display and this has_key-thing? dunno).

greetings
Christian


2008/12/28 James Mills <prologic <at> shortcircuit.net.au>
On Sat, Dec 27, 2008 at 7:58 PM, Christian Scharkus
<mail.sensenmann <at> googlemail.com> wrote:
> Hi everybody.

Hi :)

> I'm currently writing a small chatclient based upon twisted in a mvc pattern
> and decided (because of the python-curses module not supporting clean utf-8
> output) to write the userinterface with urwid. I've found a little example
> for a irc-client in urwid using the same method to join with twisted I used
> with curses (register with the reactor using the addReader-method) and began
> to implement input at first. In my humble opinion the code should work but
> it isn't. I discovered the twisted main loop in urwid too but have no idea
> how to make use of it.
>
> Here the code and the exception
> http://codepad.org/0Hlvmp1b

I really strongly recommend that you not use
Twisted for your application, but rather use
circuits (1) instead. Why ? It's simpler, easier
to develop with and far more flexible.

Please check it out, I'm sure if you should be
sufficiently experienced enough to port your
urwid application to use circuits vs. twisted.

I might just write up a simple irc client when
I get home from work today to demonstrate
how simple it is.

cheers
James

PS: Threads are evil :)


_______________________________________________
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

Gmane