import wx import wx.lib.agw.pyprogress as PP # Our normal wxApp-derived class, as usual app = wx.App(0) dlg = PP.PyProgress(None, -1, "PyProgress Example", "An Informative Message", agwStyle=wx.PD_APP_MODAL|wx.PD_ELAPSED_TIME) dlg.SetGaugeProportion(0.2) dlg.SetGaugeSteps(50) dlg.SetGaugeBackground(wx.WHITE) dlg.SetFirstGradientColour(wx.WHITE) dlg.SetSecondGradientColour(wx.BLUE) max = 400 keepGoing = True count = 0 while keepGoing and count < max: count += 1 wx.MilliSleep(30) if count >= max / 2: keepGoing = dlg.UpdatePulse("Half-time!") else: keepGoing = dlg.UpdatePulse() dlg.Destroy() app.MainLoop()