import wx
i=0
def Timer1(evt):
global text1,i
i+=1
text1.SetLabelText(str(i))
app = wx.App()
frame = wx.Frame(None, -1, 'win.py')
t1 = wx.Timer(frame)
t1.Start(1000)
panel = wx.Panel(frame, wx.ID_ANY)
text1 = wx.StaticText(panel, wx.ID_ANY, str(i), (50, 10))
frame.Bind(wx.EVT_TIMER, Timer1)
frame.Show()
frame.Centre()
app.MainLoop()