Module twisted.internet.cfreactor
This module provides support for Twisted to interact with
CoreFoundation CFRunLoops. This includes Cocoa's NSRunLoop.
In order to use this support, simply do the following:
| from twisted.internet import cfreactor
| cfreactor.install()
Then use the twisted.internet APIs as usual. The other methods here
are not intended to be called directly under normal use. However, install
can take a runLoop kwarg, and run will take a withRunLoop arg if you need
to explicitly pass a CFRunLoop for some reason. Otherwise it will make a
pretty good guess as to which runLoop you want (the current NSRunLoop if
PyObjC is imported, otherwise the current CFRunLoop. Either way, if one
doesn't exist, it will be created).
API Stability: stable
Maintainer: Bob Ippolito
Function Summary |
|
install (runLoop)
Configure the twisted mainloop to be run inside CFRunLoop. |
Variable Summary |
dict |
_faildict = {<class twisted.internet.error.ConnectionLos...
|
install(runLoop=None)
Configure the twisted mainloop to be run inside CFRunLoop.
-
|
_faildict
-
- Type:
-
dict
- Value:
{<class twisted.internet.error.ConnectionLost at 0x8263364>: <twisted.\
python.failure.Failure twisted.internet.error.ConnectionLost>,
<class twisted.internet.error.ConnectionDone at 0x826734c>: <twisted.\
python.failure.Failure twisted.internet.error.ConnectionDone>}
|
|