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`.`python`.`systemd`.`ListenFDs``

class documentation

`class ListenFDs: (source)`

Constructor: `ListenFDs.fromEnvironment(environ, start)`

View In Hierarchy

`ListenFDs` provides access to file descriptors inherited from systemd.

Typically `ListenFDs.fromEnvironment` should be used to construct a new instance of `ListenFDs`.

Class Method | `fromEnvironment` | No summary
Method | `inheritedDescriptors` | No summary
Method | `inheritedNamedDescriptors` | No summary
Constant | `_START` | File descriptors inherited from systemd are always consecutively numbered, with a fixed lowest "starting" descriptor. This gives the default starting descriptor. Since this must agree with the value systemd is using, it typically should not be overridden.
Instance Variable | `_descriptors` | A `list` of `int` giving the descriptors which were inherited.
Instance Variable | `_names` | A `Sequence` of `str` giving the names of the descriptors which were inherited.

@classmethod
def fromEnvironment(cls, environ: `Optional[Mapping[str, str]]` = None, start: `Optional[int]` = None) -> `ListenFDs`: (source)

Parameters
environ:`Optional[Mapping[str, str]]` | A dictionary-like object to inspect to discover inherited descriptors. By default, `None`, indicating that the real process environment should be inspected. The default is suitable for typical usage.
start:`Optional[int]` | An integer giving the lowest value of an inherited descriptor systemd will give us. By default, `None`, indicating the known correct (that is, in agreement with systemd) value will be used. The default is suitable for typical usage.
Returns
`ListenFDs` | A new instance of `cls` which can be used to look up the descriptors which have been inherited.

def inheritedDescriptors(self) -> `List[int]`: (source)

Returns
`List[int]` | The configured descriptors.

def inheritedNamedDescriptors(self) -> `Dict[str, int]`: (source)

Returns
`Dict[str, int]` | A mapping from the names of configured descriptors to their integer values.

_START: `int` = (source)

File descriptors inherited from systemd are always consecutively numbered, with a fixed lowest "starting" descriptor. This gives the default starting descriptor. Since this must agree with the value systemd is using, it typically should not be overridden.

Value

    3

_descriptors: `Sequence[int]` = (source)

A `list` of `int` giving the descriptors which were inherited.

_names: `Sequence[str]` = (source)

A `Sequence` of `str` giving the names of the descriptors which were inherited.