Plotter uses a class-wide instance of me to hold weak references to its instances.

See AlsoPlotter.showAll, which uses my weak references to show the Matplotlib figures for all instances of Plotter and then remove them.
Method __init__ PlotterHolder()
Method add Adds the Plotter instance (or anything, really, but plotters are what I was intended for) to my weak-reference registry.
Method remove Removes the Plotter instance identified by the supplied ID from my weak-reference registry.
Method removeAll Removes all Plotter instances from my weak-reference registry.
Method doForAll Does the method named methodName, with any args and kw, for each Plotter instance I'm keeping track of.
def __init__(self):

PlotterHolder()

def add(self, obj):

Adds the Plotter instance (or anything, really, but plotters are what I was intended for) to my weak-reference registry.

Returns an integer ID that you can use with a call to remove and thus avoid having to keep a reference to the object yourself.

def remove(self, ID):

Removes the Plotter instance identified by the supplied ID from my weak-reference registry.

def removeAll(self):

Removes all Plotter instances from my weak-reference registry.

def doForAll(self, methodName, *args, **kw):

Does the method named methodName, with any args and kw, for each Plotter instance I'm keeping track of.

Returns True if there was at least one object that successfully performed methodName.

API Documentation for yampex, generated by pydoctor at 2022-11-21 15:03:54.