usr bin python coding cp1251 import wx time class Window wx Frame def

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#! /usr/bin/python
# -*- coding: cp1251 -*-
import wx, time
class Window(wx.Frame):
def __init__(self, parent, id, title):
wx.Frame.__init__(self, parent, id, title, size = (400, 200))
panel = wx.Panel(self, -1)
panel.SetBackgroundColour('#ffffff')
self.listbox = wx.ListBox(panel, -1, size = (400, 200))
for i in range(10):
self.listbox.Append(str(i) + 'Hello!')
time.sleep(3)
self.Centre()
self.Show(True)
app = wx.App()
frame = Window(None, -1, 'Hello, world!')
app.MainLoop()