446
446
"""A convenient handler for hook functions.
451
452
# register a hook, taking its name from the function name
456
457
# register a hook, providing a custom hook name
457
458
@hooks.hook("config-changed")
461
462
if __name__ == "__main__":
462
463
# execute a hook based on the name the program is called by