wxPython is a cross-platform GUI toolkit for Python, providing a native look and feel on Windows, macOS, and Linux by wrapping the wxWidgets C++ library. The current version (4.x, "Phoenix") is a re-implementation focused on improved speed, maintainability, and extensibility. It is actively maintained with regular releases.
pip install wxPythonVerified import paths — ran on the pinned version, not inferred.
This quickstart creates a basic wxPython application with a main window, a static text label, and a button. Clicking the button displays a message box. The `wx.App(False)` initialization prevents stdout/stderr redirection, and `app.MainLoop()` starts the event processing.
Consult the "Phoenix Migration Guide" in the official documentation to adapt existing code.
Use `wx.CallAfter()`, `wx.CallLater()`, or `wx.PostEvent()` to safely marshal updates from worker threads to the GUI thread.
Offload time-consuming tasks to separate threads or processes. Use thread-safe methods (`wx.CallAfter`, `wx.PostEvent`) to communicate results back to the GUI thread. Consider `wxasync` for `asyncio` integration for cooperative multitasking.
Use `import pubsub` directly and adapt import paths (e.g., change `from wx.lib.pubsub import pubsub` to `import pubsub`).
No dependency data recorded yet.