[PEAK] Trellis WXEventLoop patch

Sergey Schetinin maluke at gmail.com
Wed Jun 25 21:20:31 EDT 2008


Here's what I get:

Traceback (most recent call last):
  File "test.py", line 4, in <module>
    wx.CallLater(0.1, lambda:None)
  File "C:\Python25\lib\site-packages\wx-2.8-msw-unicode\wx\_core.py",
line 14404, in __init__
    self.Start()
  File "C:\Python25\lib\site-packages\wx-2.8-msw-unicode\wx\_core.py",
line 14421, in Start
    self.timer.Start(self.millis, wx.TIMER_ONE_SHOT)
  File "C:\Python25\lib\site-packages\wx-2.8-msw-unicode\wx\_misc.py",
line 1298, in Start
    return _misc_.Timer_Start(*args, **kwargs)
wx._core.PyAssertionError: C++ assertion "m_milli > 0" failed at
..\..\src\msw\timer.cpp(89) in wxTimer::Start(): invalid value for
timer timeout


If the first parameter is 1.1 for example, it just executes silently.

>> This doesn't do anything; it doesn't even run the app in a loop.  But at
>> least it doesn't core dump, either.  :)

The point is not about the loop, it fails earlier, when timer is being
created. I wonder why you don't get the exception.


> Heh ... I think it needs a
>
> app.EventLoop()
>
> after the last line. That gives me a ....

Well, maybe it's about different wx implementations, but I get that
error even without starting the loop. Actually, I don't think you need
the loop either, just look at the line number where the exception gets
raised.


-- 
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