observer Module

Observer.

class wpull.observer.Observer(*handlers)[source]

Bases: object

Observer.

Parameters:handlers – Callback functions.
add(handler)[source]

Register a callback function.

clear()[source]

Remove all callback handlers.

count()[source]

Return the number register handlers.

notify(*args, **kwargs)[source]

Call all the callback handlers with given arguments.

remove(handler)[source]

Unregister a callback function.