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`.`manhole`.`ManholeInterpreter``

class documentation

`class ManholeInterpreter(code.InteractiveInterpreter): (source)`

View In Hierarchy

Interactive Interpreter with special output and Deferred support.

Aside from the features provided by `code.InteractiveInterpreter`, this class captures sys.stdout output and redirects it to the appropriate location (the Manhole protocol instance). It also treats Deferreds which reach the top-level specially: each is formatted to the user with a unique identifier and a new callback and errback added to it, each of which will format the unique identifier and the result with which the Deferred fires and then pass it on to the next participant in the callback chain.

Method | `__init__` | Undocumented
Method | `displayhook` | Undocumented
Method | `push` | Push a line to the interpreter.
Method | `resetBuffer` | Reset the input buffer.
Method | `runcode` | Undocumented
Method | `write` | Undocumented
Class Variable | `numDeferreds` | Undocumented
Instance Variable | `buffer` | Undocumented
Instance Variable | `filename` | Undocumented
Instance Variable | `handler` | Undocumented
Method | `_cbDisplayDeferred` | Undocumented
Method | `_ebDisplayDeferred` | Undocumented
Instance Variable | `_pendingDeferreds` | Undocumented

def __init__(self, handler, locals=None, filename='<console>'): (source)

Undocumented

def displayhook(self, obj): (source)

Undocumented

def push(self, line): (source)

Push a line to the interpreter.

The line should not have a trailing newline; it may have internal newlines. The line is appended to a buffer and the interpreter's runsource() method is called with the concatenated contents of the buffer as source. If this indicates that the command was executed or invalid, the buffer is reset; otherwise, the command is incomplete, and the buffer is left as it was after the line was appended. The return value is 1 if more input is required, 0 if the line was dealt with in some way (this is the same as runsource()).

Parameters
line:`bytes` | line of text
Returns
`bool` from `code.InteractiveInterpreter.runsource`

def resetBuffer(self): (source)

Reset the input buffer.

def runcode(self, *a, **kw): (source)

Undocumented

def write(self, data, isAsync=None, **kwargs): (source)

Undocumented

numDeferreds: `int` = (source)

Undocumented

buffer: `list` = (source)

Undocumented

filename = (source)

Undocumented

handler = (source)

Undocumented

def _cbDisplayDeferred(self, result, k, obj): (source)

Undocumented

def _ebDisplayDeferred(self, failure, k, obj): (source)

Undocumented

_pendingDeferreds: `dict` = (source)

Undocumented