I manage watcher callables for STDOUT and STDERR.

You can call my run_out and run_err methods with a line of STDOUT or STDERR without worrying about a watcher being registered or unregistered during the process.

If a watcher is registered while others are being called for that same output type, it will get called, too, as long as it gets registered before the runner method finishes. And it will certainly get called the next time the runner method is called.

If a watcher is unregistered while others are being called for that same output type, it won't raise any errors. If it gets called before being unregistered, that will be the last time it ever is. If it gets unregistered before the runner method gets around to it, then it won't be called.

You can register and unregister a watcher as many times as you wish.

Method __init__ Undocumented
Method register_out Registers a watcher for lines of STDOUT.
Method register_err Registers a watcher for lines of STDERR.
Method unregister Unregisters a watcher from observing anything, STDOUT or STDERR.
Method run_out Calls all of my STDOUT watchers with the supplied line of text.
Method run_err Calls all of my STDERR watchers with the supplied line of text.
Method _check Checks that watcher is callable. Called by register_out and register_err.
Method _run Runs all the watchers in the supplied set with a line of STDOUT or STDERR. Called by run_out and run_err.
def __init__(self):
Undocumented
def _check(self, watcher):

Checks that watcher is callable. Called by register_out and register_err.

def register_out(self, watcher):

Registers a watcher for lines of STDOUT.

def register_err(self, watcher):

Registers a watcher for lines of STDERR.

def unregister(self, watcher):

Unregisters a watcher from observing anything, STDOUT or STDERR.

def _run(self, watchers, line):

Runs all the watchers in the supplied set with a line of STDOUT or STDERR. Called by run_out and run_err.

def run_out(self, line):

Calls all of my STDOUT watchers with the supplied line of text.

def run_err(self, line):

Calls all of my STDERR watchers with the supplied line of text.

API Documentation for pingspice, generated by pydoctor at 2021-09-18 08:41:11.