1
# Copyright (c) 2001-2004 Twisted Matrix Laboratories.
2
# See LICENSE for details.
5
"""Old method of wxPython support for Twisted.
7
twisted.internet.wxreactor is probably a better choice.
11
| # given a wxApp instance called myWxAppInstance:
12
| from twisted.internet import wxsupport
13
| wxsupport.install(myWxAppInstance)
15
Use Twisted's APIs for running and stopping the event loop, don't use
18
On Windows the Twisted event loop might block when dialogs are open
19
or menus are selected.
21
Maintainer: Itamar Shtull-Trauring
25
warnings.warn("wxsupport is not fully functional on Windows, wxreactor is better.")
28
from wxPython.wx import wxApp
31
from twisted.internet import reactor
32
from twisted.python.runtime import platformType
36
"""Make sure GUI events are handled."""
38
def __init__(self, app):
43
Execute pending WX events followed by WX idle events and
47
while self.app.Pending():
51
self.app.ProcessIdle()
52
reactor.callLater(0.02, self.run)
56
"""Install the wxPython support, given a wxApp instance"""
57
runner = wxRunner(app)
58
reactor.callLater(0.02, runner.run)