the classes the drawingmodel class the drawingmodel class has contents attribute that is used to hold all the figures in the drawing it also provides some convenience methods to reset the contents and to add figure to the contents class drawingmodeldef __init__(self)self contents [def clear_figures(self)self contents [def add_figure(selffigure)self contents append(figurethe drawingmodel is relatively simple model which merely records set of graphical figures in list these can be any type of object and can be displayed in any way as long as they implement the on_paint(method it is the objects themselves which determine what they look like when drawn the drawingpanel class the drawingpanel class is subclass of the wx panel class it provides the view for the drawing data model this uses the classical mvc architecture and has model (drawingmodel) view (the drawingpaneland controller (the drawingcontrollerthe drawingpanel instantiates its own drawingcontroller to handle mouse events it also registers for paint events so that it knows when to refresh the display class drawingpanel(wx panel)def __init__(selfparentget_mode)super(__init__(parent- self setbackgroundcolour(wx colour( )self model drawingmodel(self controller drawingcontroller(selfself modelget_modeself bind(wx evt_paintself on_paintself bind(wx evt_left_downself controller on_mouse_click