tyssue.behaviors package¶
Subpackages¶
Submodules¶
tyssue.behaviors.event_manager module¶
Event management module¶
-
class
tyssue.behaviors.event_manager.
EventManager
(element=None, logfile=None)[source]¶ Bases:
object
Behavior management class based on two deques, the current and next one.
Creates an events class
- Parameters
element (str) – element on which the events occur, e.g face or cell, optional
logfile (str, default None) – if logfile is not None, will create a logging handler for this file where each event will be logged
-
append
(behavior, **kwargs)[source]¶ Add an event to the manager’s next deque
behavior is a function whose signature is ..code :
behavior(sheet, manager, **kwargs)
this function itself might populate the managers next deque
- Parameters
behavior (function) –
kwargs (dict defaults to {}) – keywords arguments to the behavior function if “face_id” is in the kwargs dictionnary, the face with this id is used.
Module contents¶
Behavior and event management module