Jquery-like event system for python