Re: Trellis WXEventLoop patch

"Sergey Schetinin" <[email protected]>
Newsgroups gmane.comp.python.peak
Message-ID <[email protected]>
from time import sleep, time
from peak.events.trellis import *
from peak.events.activity import *

next = Cell(value=Time[0])

@Cell
def depend():
    if next.value:
        #print time()
        next.value = next.value[0.1]
        bool(next.value)
        next_time = EventLoop._next_time
        if next_time and next_time < 0:
            raise ValueError('EventLoop._next_time == %s' % next_time)
        sleep(0.2)

depend.value

EventLoop.run()


On Wed, Jun 18, 2008 at 06:11, Phillip J. Eby <pje-Wh6+Hckhi6HFNGf7iClzIwC/[email protected]> wrote:
> At 04:29 AM 6/18/2008 +0300, Sergey Schetinin wrote:
>>
>> If that sounds like a bug, I think I know
>> what minimal wx app will reproduce the problem.
>
> If you can manage it without wx, that would be even better.  I think I see
> the way you could end up with a negative value, but I'm not clear as yet how
> I could *force* that to occur.
>
>



-- 
Best Regards,
Sergey Schetinin

http://s3bk.com/ -- S3 Backup
http://word-to-html.com/ -- Word to HTML Converter
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.