import wx class welcomeframe(wx frame)""the main window frame of the application ""def __init__(self)super(__init__(parent=nonetitle='sample app'size=( )set up panel within the frame and text label self panel wx panel(selfself text wx statictext(self panellabel='hello'bind the on_mouse_click method to the mouse event via the left mouse click binder self panel bind(wx evt_left_downself on_mouse_clickdef on_mouse_click(selfmouse_event)""when the left mouse button is clicked this method is called it will obtain the current mouse coordinatesand reposition the text label to this position ""xy mouse_event getposition(print(xyself text setposition(wx point(xy)class mainapp(wx app)def oninit(self)""initialise the main gui application""frame welcomeframe(frame show(indicate that processing should continue return true run the gui application app mainapp(app mainloop(