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”:
Search in specific fields. The following search matches all objects
in "twisted.mail" that matches “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”:
Results provided by Lunr.js
Scheduling utility methods and classes.
||Provide a deterministic, easily-controlled implementation of
||Cooperative task scheduler.|
||Call a function repeatedly.|
||This exception is raised when a task is resumed which was not previously paused.|
||The operation could not be completed because the scheduler or one of its tasks was in an invalid state. This exception should not be raised directly, but is a superclass of various scheduler-state-related exceptions.|
||The operation could not complete because the scheduler was stopped in progress or was already stopped.|
||The operation could not complete because the task was already completed.|
||The operation could not complete because the task died with an unhandled error.|
||The operation could not complete because the task was already completed, stopped, encountered an error or otherwise permanently stopped running.|
||The operation could not complete because the task was stopped.|
||Cooperatively iterate over the given iterator, dividing runtime between it and all other iterators which have been passed to this function and not yet exhausted.|
||Start running the given iterator as a long-running cooperative task, by calling next() on it as a periodic timed event.|
||Call the given function after a certain period of time has passed.|
||Call main and run the reactor until the
Start running the given iterator as a long-running cooperative task, by calling next() on it as a periodic timed event.
This is very useful if you have computationally expensive tasks that you want to run without blocking the reactor. Just break each task up so that it yields frequently, pass it in here and the global
Cooperator will make sure work is distributed between them without blocking longer than a single iteration of a single task.
|iterator:||the iterator to invoke.|
Call the given function after a certain period of time has passed.
|clock:||The object which will be used to schedule the delayed call.|
|delay:||The number of seconds to wait before calling the function.|
|callable:||The callable to call after the delay, or None.|
|*args:||The positional arguments to pass to callable.|
|**kw:||The keyword arguments to pass to callable.|
|A deferred that fires with the result of the callable when the specified time has elapsed.|
Call main and run the reactor until the
Deferred it returns fires or the coroutine it returns completes.
This is intended as the way to start up an application with a well-defined completion condition. Use it to write clients or one-off asynchronous operations. Prefer this to calling reactor.run directly, as this function will also:
- Take care to call reactor.stop once and only once, and at the right time.
- Log any failures from the Deferred returned by main.
- Exit the application when done, with exit code 0 in case of success and 1 in case of failure. If main fails with a SystemExit error, the code returned is used.
The following demonstrates the signature of a main function which can be used with
async def main(reactor, username, password): return "ok" task.react(main, ("alice", "secret"))
|main:||A callable which returns a |
|argv:||A list of arguments to pass to main. If omitted the callable will be invoked with no additional arguments.|
|_reactor:||An implementation detail to allow easier unit testing. Do not supply this parameter.|