Skip to content

ksignal! A fast, compact class Python for running multiple functions across files with just one line of code.

Notifications You must be signed in to change notification settings

JKasCode/ksignal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ksignal

Fast, compact and easy to use signal class to run multiple functions at once

GitHub release (latest by date) GitHub all releases

Usage

  1. Insert the ksignal.py file into your Python project
  2. import the module into your code where you will use it
  3. Create a new ksignal object and add it to a variable with ksignal.ksignal()

Functions

ksignal.connect( variant function )
-> returns variant

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.

ksignal.disconnect( variant index )
-> returns None

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.

ksignal.reset()
-> returns None

Disconnects all connected functions and resets the stored function list.

ksignal.fire( tuple arguments )
-> returns None

Runs all the currently connected functions with the given arguments.

Example

Run the example.py file included with this repo using Python 3.

About

ksignal! A fast, compact class Python for running multiple functions across files with just one line of code.

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Languages