ich wxpython zum ersten Mal versucht, so brauche ich ein Beispielprogramm mit den Details, wie es laufenwxpython Compilation
Antwort
Es gibt mehrere Tutorials. Vielleicht möchten Sie hier beginnen: http://wiki.wxpython.org/Getting%20Started
Unter anderem enthält diese Seite einige Beispielanwendungen, von einer einfachen "Hallo Welt" bis zur Ereignisbehandlung und anderen Beispielen.
Hier sind einige nützliche Tutorials für Anfänger. Es war sehr hilfreich für mich. Sie können Anfänger bis Mittelstufe lernen.
Zuerst stellen Sie sicher, Python 2.7.x auf Ihrem System installiert haben, fahren Sie dann auf die wxpython download Seite und die entsprechenden Binärdateien für Ihr System herunterladen sowie die Dokumentation und demos.If Sie verwenden Linux erhalten wxpython aus Ihrem Distributions-Repository. kopieren und speichern Sie das folgende Skript als app.py
#! /usr/bin/env python
import wx
#implimenting a the frame
class MyFrame(wx.Frame):
#Begining __init__()
def __init__(self):
wx.Frame.__init__(self, parent = None, id = -1, title = "A simple App", pos = (-1, -1), size = (400, 300), style = wx.DEFAULT_FRAME_STYLE)
#End __init__()
#implimenting the application
class MyApp(wx.App):
#Begining OnInit(self)
def OnInit(self):
self.frame = MyFrame()
self.frame.Show(True)
self.SetTopWindow(self.frame)
return True
#End OnInit(self)
#first chech whether the script is being run as the main script if so run the main application loop
if __name__ == '__main__':
app = MyApp()
app.MainLoop()
Auf Fenster Doppel nur das Skript klicken sie auf Unix-Systemen laufen zuerst das Terminal starten und das Arbeitsverzeichnis in das ein ändern, in dem Sie das Skript gespeichert haben Führen Sie dann chmod +x app.py
dann ./app.py
aus, um es auszuführen. Sie sollten auch in das Buch "wxpython in Aktion 2012" schauen.
- 1. GWT Compilation
- 2. wxPython-Ausführung
- 3. WxPython Tutorial
- 4. wxPython Fortschrittsbalken
- 5. WxPython - Taste
- 6. wxpython wx.EVT_LEFT_DOWN
- 7. Android ICS Compilation Problem
- 8. Distributed Compilation für Tensorflow
- 9. Compilation Fehler mit GTKMM
- 10. android system class compilation
- 11. Stop Compilation in Code
- 12. Dynamische Variable Compilation
- 13. bricht JSP Compilation
- 14. OCaml Compilation mit corebuild
- 15. Compilation Fehler bei Vorlage
- 16. Was ist Cross Compilation?
- 17. Lambda Ausdruck Compilation
- 18. .NET Core Dynamic Compilation
- 19. wxPython: Etwas erweitern
- 20. Ein WxPython-Timeline-Widget
- 21. wxpython filecopy Fortschrittsbalken
- 22. wxPython Frame deaktivieren/aktivieren?
- 23. wxpython PyEmbeddedImage Unicode-Fehler?
- 24. wxPython: Update wx.ListBox Liste
- 25. wxPython Werkzeugleiste Hilfe
- 26. WxPython, Wechselrahmen Stil
- 27. Doppelte Pufferung mit wxpython
- 28. Unicode und wxPython TextCtrl
- 29. wxPython in Python 3.4.1
- 30. Themen, wxpython und statusbar