Get caret position (X,Y) in editor

Hi,
I am would like to pop a menu at the current caret position in the editor, anyone have any clean tips on how to get the caret position “from inside python”?

Thanks