I'd really like to be able to ask my program "where is the mouse pointer?" at any given time.

Ideally I'll want people to click and hold a button, which will cause a stream of events to occur, and then (at varying points) the program should find out where their mouse pointer is (while they are still holding down the button).

Is this possible? I've looked into the Canvas widget and feel that the answer must be there, but haven't been able to find it.

Ahh, thanks!

I was hoping to incorporate this functionality into Tkinter though. Is this possible too?

Ahh, also, his code only collects the mouse coordinates on a button click. I need to be able to query for them WHILE the person is holding down a button -- so the program has to be able to do it on its own.