dc = wx.BufferedPaintDC(self, self.buffer) is the line of code from the method On_Paint.
Hope that helps John