Events ====== This example shows how to setup callbacks on the Guerilla events. Register a callback ------------------- Let's add a callback function called on a "new document" event. .. code-block:: python from guerilla import event # Our callback def onNewDocument (event, args): print ("New document") # Register the call back event.register ("newdocument", onNewDocument) Going further ------------- * Try the next example in :doc:`index` * Explore the API documentation * :class:`~guerilla.event`