Package twisted :: Package internet :: Module cfreactor |
[frames | no frames]

## 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

Classes
`CFReactor` |
`SelectableSocketWrapper` |

Function Summary
| ``install`(runLoop)` Configure the twisted mainloop to be run inside CFRunLoop.

Function Details

### install(runLoop=None) Configure the twisted mainloop to be run inside CFRunLoop.

Generated by Epydoc 2.0 on Sat Oct 25 00:54:57 2003 | http://epydoc.sf.net