2 from wxPython
.wx 
import * 
   4 #---------------------------------------------------------------------- 
   6 class TestPanel(wxPanel
): 
   7     def __init__(self
, parent
, log
): 
   8         wxPanel
.__init
__(self
, parent
, -1) 
  12         wxStaticText(self
, -1, "This example shows the wxGauge control.", 
  15         self
.g1 
= wxGauge(self
, -1, 50, wxPoint(110, 50), wxSize(250, 25)) 
  16         self
.g1
.SetBezelFace(3) 
  17         self
.g1
.SetShadowWidth(3) 
  19         self
.g2 
= wxGauge(self
, -1, 50, wxPoint(110, 95), wxSize(250, 25), 
  20                           wxGA_HORIZONTAL|wxGA_SMOOTH
) 
  21         self
.g2
.SetBezelFace(5) 
  22         self
.g2
.SetShadowWidth(5) 
  24         EVT_IDLE(self
, self
.IdleHandler
) 
  27     def IdleHandler(self
, event
): 
  28         self
.count 
= self
.count 
+ 1 
  31         self
.g1
.SetValue(self
.count
) 
  32         self
.g2
.SetValue(self
.count
) 
  36 #---------------------------------------------------------------------- 
  38 def runTest(frame
, nb
, log
): 
  39     win 
= TestPanel(nb
, log
) 
  42 #----------------------------------------------------------------------