param.parameterized.Watcher#

class param.parameterized.Watcher(*args, **kwargs)[source]#

Object declaring a callback function to invoke when an Event is triggered on a watched item.

inst: Parameterized instance owning the watched Parameter, or None

cls: Parameterized class owning the watched Parameter

fn: Callback function to invoke when triggered by a watched Parameter

mode: ‘args’ for param.watch (call fn with PInfo object positional args), or ‘kwargs’ for param.watch_values (call fn with <param_name>:<new_value> keywords)

onlychanged: If True, only trigger for actual changes, not setting to the current value

parameter_names: List of Parameters to watch, by name

what: What to watch on the Parameters (either ‘value’ or a slot name)

queued: Immediately invoke callbacks triggered during processing

of an Event (if False), or queue them up for processing later, after this event has been handled (if True)

precedence: A numeric value which determines the precedence of

the watcher. Lower precedence values are executed with higher priority.

__init__()#

Methods

__init__()

count(value, /)

Return number of occurrences of value.

index(value[, start, stop])

Return first index of value.

Attributes

cls

Alias for field number 1

fn

Alias for field number 2

inst

Alias for field number 0

mode

Alias for field number 3

onlychanged

Alias for field number 4

parameter_names

Alias for field number 5

precedence

Alias for field number 8

queued

Alias for field number 7

what

Alias for field number 6