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.

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 Examples
  • Explore the API documentation