Cursor Location

Tim Roberts timr at probo.com
Fri Oct 21 02:20:12 EDT 2005


"Samantha" <samantha7395 at hotmail.com> wrote:
>
>Is there any code that would allow a person to click a location on the 
>screen and have that location saved for a future use? For example to imbed a 
>watermark on an image or text, etc.

Getting the point is easy.  If you are using wxPython, your EVT_LEFT_UP
handler gets a mouse event as a parameter:

    def OnClick( self, evt ):
        print evt.GetPositionTuple()

Once you have the tuple, it's up to you to save it somewhere.
-- 
- Tim Roberts, timr at probo.com
  Providenza & Boekelheide, Inc.



More information about the Python-list mailing list