pingspice.ngspice.stdio.WatcherManager(object)
class documentation
Part of pingspice.ngspice.stdio
(View In Hierarchy)
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 . |
Checks that watcher is callable. Called by register_out
and register_err
.