Náš první skript s knihovnou wxPython




#!/usr/local/bin/env python

from wxPython.wx import *

Title = " Projekt"

class MyFrame(wxFrame):

    def __init__(self, parent, id, title):

        wxFrame.__init__(self, parent, id, title, wxPoint(150, 150),
                         wxSize(650, 400))

        self.CenterOnScreen()


class MyApp(wxApp):

    def OnInit(self):

        frame = MyFrame(NULL, -1, Title)
        frame.Show(true)
        self.SetTopWindow(frame)
        return(true)

app = MyApp()
app.MainLoop()