WxPython

wxPython

Logo
Basisdaten

Entwickler Robin Dunn
Harri Pasanen
Edward Zimmerman[1]
Erscheinungsjahr 9. August 1998[2]
Aktuelle Version 4.2.4
(28. Oktober 2025)
Betriebssystem plattformunabhängig
Programmier­sprache C++, Python[3]
Kategorie Klassenbibliothek
Lizenz Freie-Software-Lizenz, GNU General Public License
wxpython.org

wxPython ist ein Wrapper des GUI-Toolkits wxWidgets für die Programmiersprache Python. Die Verwendung ist fast identisch mit der der C++-Version. wxPython stellt eine Alternative zu Tkinter dar, das zum Pythonpaket gehört und auf der Tk-API basiert. Wie Python und wxWidgets ist wxPython quellcodeoffen und plattformunabhängig.

Beispiel

Dieses Programm erzeugt ein Fenster mit dem Text "Hallo Welt!"

#!/usr/bin/env python

import wx

class TestFrame(wx.Frame):
    def __init__(self, parent, title):
        wx.Frame.__init__(self, parent, wx.ID_ANY, title=title)
        text = wx.StaticText(self, label="Hallo Welt!")

app = wx.App(0)
frame = TestFrame(None, "Ein kleines Beispiel")
frame.Show()
app.MainLoop()

Projekt Phoenix

Project Phoenix, das 2010 begann, ist ein Versuch, die wxPython-Implementierung zu bereinigen und sie dabei mit Python 3 kompatibel zu machen.[4] Dieses Projekt ist eine neue Implementierung von wxPython, die sich auf die Verbesserung der Geschwindigkeit, Wartbarkeit und Erweiterbarkeit konzentriert.[5]

Genau wie "Classic" wxPython umschließt es das wxWidgets C++-Toolkit und bietet Zugriff auf die Benutzeroberflächenteile der wx-API, wodurch Python-Anwendungen eine grafische Benutzeroberfläche auf Windows-, Mac- oder Unix-Systemen mit einem nativen Look & Feel und erfordert sehr wenig, wenn überhaupt, plattformspezifischer Code.[6]

wxPython-basierende Programme

  • BitTorrent, ist ein Programm für Filesharing über das BitTorrent-Protokoll
  • Dropbox, Online-Speicher/Datensynchronisierungsdienst
  • PlayOnLinux[7] und PlayOnMac,[8] grafische Konfigurationsprogramme für Wine mit dem Fokus auf Spielen
  • GRASS GIS, ein freies Open-Source-Geo-Informationssystem
  • Google Drive, Desktop-Client-Anwendung für Googles cloud-basierendes Speichersystem.[9]

Literatur

Einzelnachweise

  1. The wxPython Team: wxPython History. 14. Juli 2017, abgerufen am 4. Januar 2023 (englisch).
  2. web.archive.org.
  3. The wxpython Open Source Project on Open Hub: Languages Page. In: Open Hub. (abgerufen am 14. Juli 2018).
  4. Goals of Project Phoenix. Abgerufen am 17. März 2016 (englisch).
  5. Jake VanderPlas: Python Data Science Handbook. O'Reilly Media, 2016, ISBN 978-1-4919-1205-8 (englisch, python.engineering).
  6. Project Phoenix readme file on GitHub. Abgerufen am 1. Januar 2014 (englisch).
  7. PlayOnLinux in der englischsprachigen Wikipedia
  8. Mac gaming in der englischsprachigen Wikipedia
  9. Open source components and licenses. Google, abgerufen am 4. April 2013 (englisch).

Content Disclaimer

Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.

  1. The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
  2. There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
  3. It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
  4. Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
  5. Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.