Python/GUI
Wikikirjasto
< Python
[muokkaa] wxPython
wxPython toimii Windowsilla, Linuxilla ja Mac OS X:llä. Esimerkki:
import wx class TestFrame(wx.Frame): def __init__(self, parent, ID, title): wx.Frame.__init__(self, parent, -1, title, pos=(0, 0), size=(320, 240)) panel = wx.Panel(self, -1) text = wx.StaticText(panel, -1, "Test", wx.Point(10, 5), wx.Size(-1, -1)) class TestApp(wx.App): def OnInit(self): frame = TestFrame(None, -1, "Hello, world!") self.SetTopWindow(frame) frame.Show(True) return True if __name__ == '__main__': app = TestApp(0) app.MainLoop()
[muokkaa] Aiheesta muualla
- Python-kielisen_ohjelmoinnin_perusteet (Wikiopiston opintopiirin opiskeluohjeita)
| Johdanto: | |
|---|---|
| Tietotyypit ja tietorakenteet: |
Luvut - Merkkijonot - Lista - Monikko (tuple) - Sanakirja - Joukko (set) |
| Ohjausrakenteet | |
| Muut kielen rakenteet: | |
| Graafinen käyttöliittymä: |
GUI |
| Harjoitustehtäviä: | |
| Lisätiedot ja lähteet: |