behaviour_dict

this module defines a custom dict

BehaviourDict is a subclass of dict and modifies mainly the __setitem__ method by calling a setter method for the given key if the setter method has been registered before

class roqba.utilities.behaviour_dict.BehaviourDict(*args, **kwargs)[source]

defines a dictionary-class with custom setter methods

upon every __setitem__ call it checks if it has registered setter methods and calls them with the given value

read_or_create_saved_behaviours(name='.saved_behaviours')[source]

reads saved behaviours if there are, otherwise creates them

save_current_behaviour(name=None, write_to_file=True)[source]

adds current behaviour to the saved behaviours dict

voice_get(vid, key)[source]

returns the value for the specified key.

if the value is present for the voice, this value is returned otherwise the default value for this key is returned

write_saved_behaviours(name='.saved_behaviours')[source]

writes the saved behaviours to file

roqba.utilities.behaviour_dict.test_setter(val)[source]