#NEWLINE# def register_hook( self , event , url ) : #NEWLINE# #INDENT# '  associate an url to an event ' #NEWLINE# if ( event not in self . events ) : #NEWLINE# #INDENT# self . events [ event ] = set ( ) #NEWLINE# #UNINDENT# self . events [ event ] . add ( url ) #NEWLINE# self . incref ( ) #NEWLINE# self . maybe_start_monitor ( )