this method can be used to draw whatever the contents of the window should be if you do not redraw the contents of the device context in such method than whatever you previously drew will display when the window is refreshed the following simple program illustrates the use of some of the draw methods listed above and how method can be bound to the paint event so that the display is refreshed appropriately when using device contextimport wx class drawingframe(wx frame)def __init__(selftitle)super(__init__(nonetitle=titlesize=( )self bind(wx evt_paintself on_paintdef on_paint(selfevent)"""set up the device context (dcfor painting""dc wx paintdc(selfdc drawline( dc drawrectangle( dc drawtext("hello world" dc drawcircle( radius= class graphicapp(wx app)def oninit(self)""initialise the gui display""frame drawingframe(title='pydraw'frame show(return true run the gui application app graphicapp(app mainloop(when this program is run the following display is generated