Go to the latest version of this document.
search in docstrings

Search bar offers the following options:

- Term presence. The below example searches for documents that must contain “foo”, might contain “bar” and must not contain “baz”: `+foo bar -baz`
- Wildcards. The below example searches for documents with words beginning with “foo”: `foo*`
- Search in specific fields. The following search matches all objects in "twisted.mail" that matches “search”: `+qname:twisted.mail.* +search`

  Possible fields: 'name', 'qname' (fully qualified name), 'docstring', and 'kind'. Last two fields are only applicable if "search in docstrings" is enabled.

- Fuzzy matches. The following search matches all documents that have a word within 1 edit distance of “foo”: `foo~1`

Results provided by Lunr.js

# ``twisted`.`internet`.`cfreactor``

module documentation
(source)

A reactor for integrating with CFRunLoop, the CoreFoundation main loop used by macOS.

This is useful for integrating Twisted with PyObjC applications.

Class | `CFReactor` | The CoreFoundation reactor.
Function | `install` | Configure the twisted mainloop to be run inside CFRunLoop.
Class | `_WakerPlus` | The normal Twisted waker will simply wake up the main loop, which causes an iteration to run, which in turn causes `ReactorBase.runUntilCurrent` to get invoked.
Constant | `_READ` | Undocumented
Constant | `_WRITE` | Undocumented
Variable | `_preserveSOError` | Undocumented

def install(runLoop=None, runner=None): (source)

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
`CFReactor` | The installed reactor.

_READ: `int` = (source)

Undocumented

Value

    0

_WRITE: `int` = (source)

Undocumented

Value

    1

_preserveSOError = (source)

Undocumented