Имею такой код:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import wx
import random
class MainFrame(wx.Frame):
def __init__(self, parent):
wx.Frame.__init__(self, parent, -1, u"None", None, None, wx.CAPTION | wx.SYSTEM_MENU | wx.CLOSE_BOX | wx.STAY_ON_TOP)
self.panel = wx.Panel(self)
self.SetSize((600, 400))
self.Center()
self.a = "50"
ran = range(50)
random.shuffle(ran)
for i in ran:
self.button1 = wx.Button(self.panel, -1, '->', (10,90), (30, 30))
self.button2 = wx.Button(self.panel, -1, '->', (0,130), (30, 30))
self.button3 = wx.Button(self.panel, -1, '->', (10,170), (30, 30))
class App(wx.App):
def OnInit(self):
frame = MainFrame(None)
frame.Show()
return True
def main():
application = App()
application.MainLoop()
if __name__ == '__main__':
main()
Заранее спасибо.