Python widget/cursor detection?
<p>Beginner python learner here. I have a question that I have tried to Google but I just can't come up with the proper way to ask in just a few words (partly because I don't know the right terminology.)</p>

<p>How do I get python to detect other widgets? For example, if I wanted a script to check and see when I click my mouse if that click put focus on an entry widget on a (for example) website. I've been trying to get it to work in Tkinter and I can't figure out even where to begin.</p>

<p>I've seen this:</p>

<pre><code>    focus_displayof(self)
    Return the widget which has currently the focus on the
    display where this widget is located.
</code></pre>

<p>But the return value for that function seems to be some ambiguous long number I can't decipher, plus it only works in its own application.</p>

<p>Any direction would be much appreciated. :)</p>
