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`.`conch`.`client`.`knownhosts`.`ConsoleUI``

class documentation

`class ConsoleUI: (source)`

Constructor: `ConsoleUI(opener)`

View In Hierarchy

A UI object that can ask true/false questions and post notifications on the console, to be used during key verification.

Method | `__init__` | No summary
Method | `prompt` | Write the given text as a prompt to the console output, then read a result from the console input.
Method | `warn` | Notify the user (non-interactively) of the provided text, by writing it to the console.
Instance Variable | `opener` | Undocumented

def __init__(self, opener): (source)

Parameters
opener:callable taking no arguments and returning a read/write file-like object | A no-argument callable which should open a console binary-mode file-like object to be used for reading and writing. This initializes the `opener` attribute.

def prompt(self, text): (source)

Write the given text as a prompt to the console output, then read a result from the console input.

Parameters
text:`bytes` | Something to present to a user to solicit a yes or no response.
Returns
a `Deferred` which fires with `True` when the user answers 'yes' and `False` when the user answers 'no'. It may errback if there were any I/O errors.

def warn(self, text): (source)

Notify the user (non-interactively) of the provided text, by writing it to the console.

Parameters
text:`bytes` | Some information the user is to be made aware of.

opener = (source)

Undocumented