Camera sequencer and scripted ui



I’ve inherited a script that displays a scripted ui (python), somehow the script is able to know when a new shot is added in the camera sequencer and update it’s ui to reflect the shot entry with a row of buttons related to that shot.

I can’t figure out how the script is able to ‘listen’ to the camera sequencer, can anyone point to any examples or key words I should be searching the the docs? In 3dsmax I would look for something called a callback but in maya I’m totally lost.

Thanks for reading