Configure the twisted mainloop to be run inside CFRunLoop.
Parameters | runLoop | the run loop to use. |
| runner | the function to call in order to actually invoke the main loop. This will
default to CFRunLoopRun if not specified. However, this is
not an appropriate choice for GUI applications, as you need to run
NSApplicationMain (or something like it). For example, to run the Twisted
mainloop in a PyObjC application, your main.py should look
something like this:
from PyObjCTools import AppHelper
from twisted.internet.cfreactor import install
install(runner=AppHelper.runEventLoop)
# initialize your application
reactor.run()
|
Returns | The installed reactor. (type: CFReactor ) |