How to get the active viewer


In Python, how do I get the viewer that is active in the user interface. eg if I have two viewers open, what is the name or reference of the one that is currently receiving user input?


Sorry for the late reply. I can add a function so you can query which is the current PyViewer (last user input).
I will also do so for PyTabWidget