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`.`application`.`runner`.`_pidfile`.`NonePIDFile``

class documentation

`class NonePIDFile: (source)`

Implements interfaces: `twisted.application.runner._pidfile.IPIDFile`

View In Hierarchy

PID file implementation that does nothing.

This is meant to be used as a "active None" object in place of a PID file when no PID file is desired.

Method | `__enter__` | Enter a context using this PIDFile.
Method | `__exit__` | Exit a context using this PIDFile.
Method | `__init__` | Undocumented
Method | `isRunning` | Determine whether there is a running process corresponding to the PID in this PID file.
Method | `read` | Read the process ID stored in this PID file.
Method | `remove` | Remove this PID file.
Method | `writeRunningPID` | Store the PID of the current process in this PID file.
Method | `_write` | Store a PID in this PID file.

def __enter__(self) -> `NonePIDFile`: (source)
from `twisted.application.runner._pidfile.IPIDFile`

Enter a context using this PIDFile.

Writes the PID file with the PID of the running process.

Raises
`AlreadyRunningError` | A process corresponding to the PID in this PID file is already running.

def __exit__(self, excType: `Optional[Type[BaseException]]`, excValue: `Optional[BaseException]`, traceback: `Optional[TracebackType]`): (source)
from `twisted.application.runner._pidfile.IPIDFile`

Exit a context using this PIDFile.

Removes the PID file.

def __init__(self): (source)

Undocumented

def isRunning(self) -> `bool`: (source)
from `twisted.application.runner._pidfile.IPIDFile`

Determine whether there is a running process corresponding to the PID in this PID file.

Returns
`bool` | True if this PID file contains a PID and a process with that PID is currently running; false otherwise.
Raises
`EnvironmentError` | If this PID file cannot be read.
`InvalidPIDFileError` | If this PID file's content is invalid.
`StalePIDFileError` | If this PID file's content refers to a PID for which there is no corresponding running process.

def read(self) -> `int`: (source)
from `twisted.application.runner._pidfile.IPIDFile`

Read the process ID stored in this PID file.

Returns
`int` | The contained process ID.
Raises
`NoPIDFound` | If this PID file does not exist.
`EnvironmentError` | If this PID file cannot be read.
`ValueError` | If this PID file's content is invalid.

def remove(self): (source)
from `twisted.application.runner._pidfile.IPIDFile`

Remove this PID file.

Raises
`EnvironmentError` | If this PID file cannot be removed.

def writeRunningPID(self): (source)
from `twisted.application.runner._pidfile.IPIDFile`

Store the PID of the current process in this PID file.

Raises
`EnvironmentError` | If this PID file cannot be written.

def _write(self, pid: `int`): (source)

Store a PID in this PID file.

Parameters
pid:`int` | A PID to store.
Raises
`EnvironmentError` | If this PID file cannot be written.
Note
This implementation always raises an `EnvironmentError`.