Re: nanothreads: Want to use them from within wxPython app
- From: simonwittber@xxxxxxxxx
- Date: 11 Dec 2005 23:16:11 -0800
F. GEIGER wrote:
> I've def'ed a handler for EVT_IDLE in the app's main frame. There I'd like
> to call the nanothreads' __iter__ method, somehow.
>
> When I copy the __iter__ method into a, say, runOnce() method and call the
> next() method of the generator returned by runOnce(), it works. But I can't
> get at the __iter__ method, which is already there and therefore should be
> used instead of messing up nanothreads with changes of mine.
>
> Any hint welcome
The latest version of nanothreads is now in the fibranet package, which
you can download from the cheeseshop:
http://cheeseshop.python.org/pypi/FibraNet
To iterate nanothreads from wx, I call the nanothreads.poll() function
from the EVT_IDLE handler, making sure that I call event.RequestMore()
from within the handler, to iterate nanothreads as fast as possible.
HTH, Simon WIttber.
.
- Follow-Ups:
- Re: nanothreads: Want to use them from within wxPython app
- From: F. GEIGER
- Re: nanothreads: Want to use them from within wxPython app
- Prev by Date: Re: Using XML w/ Python...
- Next by Date: Re: Using XML w/ Python...
- Previous by thread: TypeError: no arguments expected
- Next by thread: Re: nanothreads: Want to use them from within wxPython app
- Index(es):
Relevant Pages
|