[Twisted-Python] Re: Local IP and factory shutdown

David Bolen db3l at fitlinxx.com
Wed Jun 23 17:12:48 MDT 2004


Itamar Shtull-Trauring <itamar at itamarst.org> writes:

> On Tue, 2004-06-22 at 18:35, Gill, Mandeep wrote:
(...)
> > Oh yeah, there seem to be a few bugs in the current wxreactor support,
> > most notably with any custom dialog boxes - the OK/Cancel return
> > doesn't seem to be processed on time and causes a wxDateTime assertion
> > error, does it work for anyone else?
> 
> wx integration is broken. As far as I can tell best option is running it
> in separate thread... or better yet, not using wx at all.

Note that we've had fine luck using the standard reactor and iterating
it via a wxTimer, based off of the entry at:

  http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/181780

You do end up enforcing some time granularity on the network due to
whatever timer frequency you pick, but so far it's been more than
sufficient for our applications.

The tweaks we made were to shorten the timer to about 150ms, and
explicitly stop the timer and reactor in an OnExit() routine.  I also
experimented with additional reactor iterations in an Idle handler,
but found that they really didn't make that much of a difference in
network performance.

Note that most of our wx-based applications are GUI interfaces, so the
interface is the primary application with the networking in support of
that.  For those whose application is the opposite (the GUI is an
add-on to the protocol support) it might be more limited by the impact
of the periodic reactor execution, I'm not sure.

-- David






-- 
/-----------------------------------------------------------------------\
 \               David Bolen            \   E-mail: db3l at fitlinxx.com  /
  |             FitLinxx, Inc.            \  Phone: (203) 708-5192    |
 /  860 Canal Street, Stamford, CT  06902   \  Fax: (203) 316-5150     \
\-----------------------------------------------------------------------/





More information about the Twisted-Python mailing list