- Insert the
ksignal.py
file into your Python project import
the module into your code where you will use it- Create a new
ksignal
object and add it to a variable withksignal.ksignal()
Connect one or more functions to the ksignal class, returning the new connection index/s.
variant function
can be a single function or a list with functions. If a list is given, a list will be returned with the connection indices, otherwise a single integer will be returned.
Disconnects the stored function of the given index/s. Index/s is given in the return value of ksignal.connect
A single integer or a list of integers can be given to disconnect multiple connections at once.
Disconnects all connected functions and resets the stored function list.
Runs all the currently connected functions with the given arguments.
Run the example.py
file included with this repo using Python 3.