Click events python

Hi,

how can I get the same feature as in the first JS example of this page, on Python ?

Thanks for the support.