[PEAK] Trellis WXEventLoop patch

Sergey Schetinin maluke at gmail.com
Tue Jun 17 23:22:40 EDT 2008


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 at telecommunity.com> 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



More information about the PEAK mailing list