Fact-checked by Grok 2 weeks ago

wxPython

wxPython is a free and open-source cross-platform graphical user interface (GUI) toolkit for the Python programming language, which provides Python bindings for the wxWidgets C++ library to enable developers to create applications with native appearance and behavior on multiple operating systems. It allows programmers to build robust, feature-rich desktop applications using Python's simplicity while leveraging wxWidgets' extensive widget set and event-driven architecture. Development of wxPython began in 1996, initiated by Robin Dunn in collaboration with Harri Pasanen and Edward Zimmerman, building upon the existing framework that had been established since 1992. Early versions, starting with wxPython 0.2, relied on manual bindings but transitioned to using the Simplified Wrapper and Interface Generator () in 1997 to streamline maintenance and support for wxWidgets' growing codebase. By 1998, the first modern release aligned with 2.0, marking the beginning of sustained active development that has continued for over two decades. A significant evolution came with Project , a ground-up reimplementation of wxPython launched to enhance performance, maintainability, and extensibility while addressing limitations in the original "" version. The Phoenix project, focused on creating a more efficient binding system, resulted in wxPython 4.0's release in 2018, which introduced improvements in speed and 3 compatibility, though it is not fully backward-compatible with prior versions—a migration guide is provided for transitioning code. Key features of wxPython include support for native widgets on Windows, macOS, and Linux/Unix (via GTK2 or GTK3), ensuring applications have a platform-specific without requiring separate codebases. It offers a comprehensive set of controls such as buttons, menus, dialogs, and advanced components like grids and rendering, all accessible through an intuitive that simplifies development—for instance, a basic "" window can be created in just a few lines of code. As an open-source project under the wxWindows license, wxPython remains actively maintained, with the latest release being version 4.2.4 as of October 2025, and ongoing releases documented in its changelog and reference available for developers.

Introduction

Overview

wxPython is a cross-platform graphical user interface (GUI) toolkit for the Python programming language, designed to enable developers to create robust and functional desktop applications. It functions as a Python wrapper around the wxWidgets C++ library, providing access to a comprehensive set of GUI components through Python extension modules. This wrapping allows Python programmers to build applications with a native look and feel on multiple operating systems, including Windows, macOS, and Linux, without needing to write platform-specific code. The primary purpose of wxPython is to facilitate the development of native-looking desktop applications using Python's simplicity and readability, making it accessible for creating user interfaces that integrate seamlessly with the host platform's . Key benefits include native widget rendering for authentic appearance and performance, an model that handles user interactions efficiently, and strong integration with Python's ecosystem for and extensibility. As of October 2025, the current stable version is wxPython 4.2.4, which is part of the implementation—a modern rewrite emphasizing speed, maintainability, and over the earlier version. This evolution to simplifies the codebase while preserving core functionalities, ensuring wxPython remains a viable choice for cross-platform .

Architecture

wxPython interfaces with the underlying C++ library through Python extension modules that provide bindings to its classes. In the classic version of wxPython, these bindings are generated using (Simplified Wrapper and Interface Generator), which automates the translation of and methods into equivalent modules, enabling seamless access to ' functionality from code. This approach allows wxPython to wrap the core components of while handling and type conversions between C++ and . The module organization in wxPython centers around the core wx package, which contains essential classes such as wx.App for application initialization, wx.Frame for top-level windows, and wx.Panel for container controls. Additional functionality is housed in subpackages like wx.lib, which includes utility modules for advanced features. This structure mirrors the hierarchical organization of , ensuring that Python developers can import and instantiate classes in a manner consistent with object-oriented practices. At the heart of wxPython's is the event loop managed by the wx.App class, which implements the native windowing system's main message loop and dispatches events to appropriate window instances. Every wxPython application requires exactly one instance of wx.App, typically created at startup, to handle event processing, such as user inputs or system notifications, through methods like MainLoop(). This design facilitates responsive behavior by queuing and routing events efficiently across the application's components. wxPython achieves cross-platform portability by leveraging wxWidgets' abstraction layers, which encapsulate platform-specific APIs—such as Win32 on Windows, Cocoa on macOS, and GTK on Linux—into a unified C++ interface. This allows wxPython applications to render native-looking widgets without direct exposure to underlying system differences, ensuring consistent behavior and appearance across supported operating systems. The Phoenix implementation of wxPython introduces hand-written bindings using an "Extractor-Tweaker-Generator" (ETG) process, replacing the SWIG-generated code of the classic version to enhance performance and maintainability. These custom bindings eliminate redundant function overloads by using runtime parameter selection, reduce memory copies in operations like image handling via Python buffer support, and organize modules to align with wxWidgets' DLL structure for simpler deployment. Overall, Phoenix improves code readability, stability, and extensibility compared to the automated SWIG approach, while supporting modern Python features like version 3.x compatibility.

History

Origins and Early Development

wxPython originated in 1996 as a Python extension for wxWindows, the precursor to the C++ GUI library, which had been founded four years earlier by Julian Smart at the to enable cross-platform application development. The project's inception traces back to 1995, when Robin Dunn required a GUI toolkit for a deployment on HP-UX systems while also demonstrating a prototype on Windows 3.1 at a trade show; collaborating with Harri Pasanen from and Edward Zimmerman, Dunn hand-coded the initial bindings for wxWindows, focusing on core functionality like windows, dialogs, and event handling. These early efforts lacked a centralized , relying instead on exchanges for code sharing among the small group of contributors, resulting in a fragile exceeding tens of thousands of lines. By 1996, Dunn assumed primary maintenance responsibilities, establishing wxPython as an independent project alongside wxWindows. The first public release, version 0.2, arrived in 1998 and emphasized Windows support through manual, early-binding techniques that directly mapped to Python without automated generation tools. In 1997, Dunn introduced a pivotal shift by adopting the Simplified Wrapper and Interface Generator (SWIG), developed by David Beazley, to automate binding creation; this led to a "modern" iteration released in summer 1998 that streamlined development and enabled broader compatibility. Unix support was integral from the project's origins with initial work for in 1995, and expanded to other Unix platforms by 2000, fulfilling its cross-platform promise beyond Windows, though ports required adaptations for varying system libraries. A major milestone occurred in 2004 following the rename of wxWindows to , with wxPython aligning to the evolving framework (such as version 2.6.0 in 2005), which introduced revisions that reduced redundancy and eased synchronization with the underlying C++ framework's updates. Throughout its formative years, wxPython faced hurdles such as sparse , which deterred newcomers, and strict version dependencies on releases, often necessitating manual recompilations for compatibility. Despite these, the pre-Phoenix community—driven by Dunn's leadership, Pasanen's contributions to core modules, Zimmerman's assistance in early releases, and Beazley's enhancements—laid the groundwork for wxPython's adoption in pioneering applications, including tools for scientific computing and data visualization. This era culminated in the mid-2000s, paving the way for later modernization efforts like Project Phoenix.

Project Phoenix

Project Phoenix was launched in 2010 by Robin Dunn, the primary developer of wxPython, to overhaul the project's codebase and resolve persistent maintenance challenges stemming from the classic version's reliance on SWIG-generated bindings. These SWIG-based wrappers had accumulated numerous kludges and workarounds over the years, making updates difficult and hindering compatibility with evolving versions. The initiative aimed to rebuild wxPython from the ground up, drawing inspiration from the mythical to symbolize renewal and improvement. The core goals of Project Phoenix focused on creating hand-written bindings using , a more efficient binding generator than , to enhance compatibility with modern implementations, including full support for 3. This shift promised improved through cleaner extension types and reduced overhead, as well as simplified and easier of updates from the underlying library. By generating bindings from XML interface headers, the project sought to distribute development efforts and automate documentation via tools like Sphinx, while allowing Python-specific customizations. Additionally, it targeted the elimination of outdated elements, such as legacy aliases, to streamline the without sacrificing essential functionality. Development progressed through several key phases, beginning with initial prototypes in 2011 that explored integration and basic generation. Early alpha releases emerged around 2014 as snapshot builds became available for testing, enabling feedback on core functionality. These efforts culminated in the first official alpha release (4.0.0a1) in April 2017, followed by versions in 2017, and the stable 4.1.0 in April 2020, marking the transition to a mature, production-ready implementation. Technically, Project Phoenix introduced SIP-based bindings as the primary alternative to , resulting in more direct and performant Python wrappers that better handled 3's syntax and features. New demonstration applications were developed to showcase the updated toolkit, replacing older examples and providing modern usage patterns. To facilitate , compatibility layers were implemented to preserve similarity between classic wxPython and Phoenix, minimizing disruptions for existing users while allowing gradual adoption. The impact of Project Phoenix was profound, revitalizing wxPython after a period of stagnation in the classic branch and enabling robust support for 3.6 and later versions. This modernization ensured the toolkit's continued relevance in cross-platform development, with enhanced speed and maintainability attracting renewed developer interest.

Recent Developments

Following the stabilization of Project Phoenix, the wxPython 4.1.x series saw incremental updates in 2021 and 2022, primarily through snapshot builds that introduced support for 3.10 and addressed various bug fixes to enhance compatibility and reliability. The 4.2.0 release in August 2022 marked a significant advancement, built against 3.2.0 and incorporating the switch to 6 for wrapper code generation, along with fixes for 3.10 on Windows and support for new features like wx.BitmapBundle. In 2023, version 4.2.1 added official Mac and Windows builds for 3.11 and 3.12, alongside updates to Linux wheels for improved cross-platform distribution. The September 2024 release of 4.2.2 further refined builds using updated CI infrastructure, included fixes for 3.12, and added compatibility with 2.0. Most recently, 4.2.3 in April 2025 introduced Windows ARM64 support, dropped 3.8 compatibility, and incorporated numerous bug fixes and build optimizations, while the October 2025 hotfix release of 4.2.4 addressed stability issues with updates to underlying libraries like libtiff 4.7.0 and PCRE2 10.44, plus support for 3.14 and ARM. Community efforts have driven ongoing enhancements, with active contributions via the wxWidgets/Phoenix GitHub repository focusing on pull requests for bug resolutions and feature refinements. Improved PyPI integration has streamlined wheel distribution across platforms, reducing installation friction for users. Documentation has expanded with updates to API references and changelogs, ensuring better coverage of recent changes and usage examples. Looking ahead, wxPython maintainers are prioritizing compatibility with 3.13, addressing build challenges in experimental free-threaded modes through ongoing repository work. Potential extensions for web integration via wx.html2.WebView and embedded environments are under consideration to broaden application scopes. Build system challenges have been mitigated by enhancements like cibuildwheel adoption for more robust platform-specific wheels, particularly for and architectures.

Features

Cross-Platform Support

wxPython provides cross-platform compatibility by leveraging platform-specific backends derived from the underlying C++ library, which abstracts native APIs to enable consistent behavior across operating systems. On Windows, it utilizes the MSW ( Windows ) backend, supporting both 32-bit (Win32) and 64-bit (Win64) architectures for native integration. For macOS, the Cocoa backend ensures seamless interaction with Apple's native UI framework. On Linux and other systems, the GTK2 or GTK3 backends deliver native rendering through the GNOME Toolkit versions 2 or 3. This architecture allows wxPython applications to adopt a native appearance automatically, incorporating system themes, default fonts, and controls that match the host platform's look and feel without requiring developer intervention. For instance, buttons and menus on Windows will follow the or Fluent Design themes, while on macOS they align with the Aqua interface, enhancing user familiarity and accessibility. The library's reliance on for this abstraction ensures that visual elements render using genuine platform components rather than emulated ones, promoting a cohesive yet authentic experience. Key portability features include a unified that standardizes interactions for common elements like dialogs, menus, and file handling, insulating developers from underlying platform variances. Developers can invoke portable dialogs such as for alerts, which adapt to native styles—e.g., using Windows message boxes or macOS sheets—while maintaining identical code. Similarly, menu creation via and file operations through provide consistent functionality, with automatic handling of platform-specific conventions like path separators or accelerator keys. Despite these strengths, wxPython encounters occasional platform-specific bugs that can affect reliability, particularly in areas like DPI scaling on high-resolution Windows displays, where improper awareness may lead to blurred or misaligned elements. Such issues arise due to varying OS implementations of scaling, and developers are recommended to test applications thoroughly on target platforms, including different resolutions and setups, to identify and mitigate discrepancies. Performance optimizations have been enhanced since the Phoenix 4.0 release, with pre-built wheels tailored to each platform's architecture and dependencies, reducing installation times and improving runtime efficiency by avoiding on-the-fly compilation. These wheels, distributed via PyPI, incorporate platform-native optimizations, such as leveraging Windows-specific APIs or GTK3 accelerations on , to deliver responsive applications across environments.

Widgets and Components

wxPython provides a rich set of widgets and components that serve as the fundamental building blocks for creating graphical interfaces. These elements are derived from the underlying C++ library, ensuring native appearance and behavior across supported platforms. Basic widgets include controls for interaction and data display, such as buttons, text inputs, and lists, which form the core of most applications. The wx.Button widget is a standard control that displays a text or and triggers an upon selection, typically used for initiating commands like submitting forms or closing dialogs. wx.TextCtrl offers versatile text handling, supporting both single-line input for fields and multi-line editing for larger content, with options for password masking and read-only modes. For displaying collections of items, wx.ListCtrl enables views in list, report, icon, or small icon formats, accommodating large datasets through virtual mode for efficient memory usage. Containers like wx.Panel provide a surface for grouping and organizing other controls within a frame, facilitating modular interface design. Advanced components extend functionality for complex interactions and navigation. wx.MenuBar manages a series of pull-down menus at the top of a frame, allowing hierarchical organization of commands with support for checkable and enabled states. The wx.ToolBar presents a row of buttons or controls, often with icons, positioned below the menu bar for quick access to frequent actions. Dialogs such as wx.MessageDialog display informational messages with customizable buttons like OK or Yes/No for user confirmation, while wx.FileDialog facilitates file selection or saving with wildcard filters and directory navigation. wx.Notebook organizes multiple windows into tabbed pages, enabling efficient space usage for multi-panel interfaces. Layout management in wxPython relies on the sizer system to arrange widgets responsively without relying on fixed pixel positions, promoting flexible and platform-adaptive designs. The abstract wx.Sizer class serves as the base for layout algorithms that query subwindow sizes and apply borders or alignments. wx.BoxSizer arranges items horizontally or vertically, supporting proportional stretching and spacing flags for dynamic resizing. In contrast, wx.GridSizer positions elements in a uniform grid based on the largest cell dimensions, ideal for tabular arrangements without variable expansion. This system ensures interfaces scale appropriately to window changes or screen resolutions. Graphics and multimedia capabilities allow for visual enhancements beyond standard controls. wx.DC, or Device Context, provides an abstract interface for drawing lines, shapes, text, and bitmaps on various output devices, with derived classes handling specific contexts like painting or printing. The wx.Image class manages platform-independent image data, supporting formats like and with alpha channels for transparency, and manipulation operations such as resizing or color adjustments before conversion to drawable bitmaps. For rendering web-like content, wx.html.HtmlWindow displays pages with basic formatting, links, and embedded images, using a subset of HTML standards within a scrollable window. Extensibility in wxPython enables developers to tailor components to specific needs through subclassing existing classes. Custom widgets can be created by inheriting from bases like wx.Control or wx.Panel, overriding methods for drawing, sizing, and handling to implement owner-drawn behaviors. Additionally, with third-party extensions is supported via the wx.lib package, which includes community-contributed controls for specialized functionalities. These widgets interact with the event-driven model, where user actions generate events for programmatic responses.

Installation and Setup

System Requirements

wxPython supports Python versions 3.9 through 3.14, with binary wheels available for these releases on compatible platforms. The project, which forms the basis of modern wxPython, has deprecated support for Python 2.7 and earlier versions. The toolkit runs on Windows 7 and later (with 64-bit architectures recommended for optimal performance, including ARM64 support on ), macOS 10.10 and newer for architectures or 11.0 and newer for (using the backend), and various distributions or other systems equipped with GTK+ 3 libraries, such as 20.04 and subsequent releases. While 32-bit support exists on some platforms, 64-bit installations are preferred to handle larger applications efficiently. The cross-platform design minimizes OS-specific prerequisites beyond the native toolkits. Hardware requirements are modest for basic usage, typically needing a 1 GHz and at least 512 MB of ; however, for developing or running complex graphical applications, a multi-core CPU and 4 GB or more of are recommended to ensure smooth performance. These align with general prerequisites for GUI development. wxPython depends on wxWidgets version 3.2 or later, which is bundled within the precompiled binary wheels to simplify deployment. Optional dependencies, such as OpenGL libraries, may be required for advanced features like or hardware-accelerated graphics. As of wxPython 4.2.4 (October 2025), official support includes 3.14 and ARM64. For compiling wxPython from source, a compatible C++ compiler is essential—such as Microsoft Visual C++ (MSVC) on Windows or / on systems—along with for generating the Python bindings during custom builds. These tools enable adaptation to specific environments or integration of modifications.

Installation Methods

The primary method for installing wxPython is via the (PyPI) using , which provides pre-built binary wheels for most supported platforms and Python versions. To install the latest stable version, run pip install -U wxPython in a terminal or command prompt, where the -U flag ensures an upgrade if an older version is present. This approach works seamlessly on Windows and macOS for 3.9 through 3.14, as wheels are available directly from PyPI, eliminating the need for manual compilation in typical cases. On distributions, installation via may require additional steps due to the lack of universal wheels; users must specify an extras index tailored to their distribution, architecture, and toolkit variant (e.g., GTK3). For example, on 22.04 with GTK3, the command is pip install -U -f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-22.04 wxPython. Alternatively, some distributions offer wxPython as a package through their repositories, such as sudo apt install python3-wxgtk4.0 on Debian-based systems like , which integrates with the system's installation but may lag behind the latest PyPI releases. wxPython installations are recommended within environments to isolate dependencies and avoid conflicts with system-wide packages. For standard , create a using python -m venv myenv, activate it (e.g., myenv\Scripts\activate on Windows or source myenv/bin/activate on Unix-like systems), and then run the pip install command within it. Conda users can alternatively install via conda install -c conda-forge wxpython, which handles platform-specific binaries through the conda-forge channel and supports environments natively via conda create and conda activate. For custom configurations or when pre-built wheels are unavailable (e.g., for unsupported Python versions or platforms), wxPython can be built from source by cloning the official repository from and using the provided build tools. Clone the Phoenix project with git clone --recursive [https](/page/HTTPS)://github.com/wxWidgets/Phoenix.git, navigate to the directory, and execute python build.py build followed by python build.py install, which requires a C++ , libraries, and platform-specific dependencies like on . If pip attempts a source build automatically (due to no matching wheel), it will download the source tarball from PyPI and compile it, but this demands equivalent prerequisites. Common installation issues include missing runtime dependencies, which can be addressed as follows: On Windows, ensure the Microsoft Visual C++ Redistributable (version 14.0 or later) is installed if building from source or encountering DLL errors, as it provides necessary runtime libraries for components. On , failures often stem from absent development packages such as libgtk-3-dev, libgstreamer1.0-dev, or X11 libraries; install these via the system (e.g., [sudo](/page/Sudo) apt install libgtk-3-dev libgstreamer-plugins-base1.0-dev libjpeg-dev libtiff-dev libwebkit2gtk-4.1-dev on 24.04) before retrying or source builds. For all platforms, verify version compatibility with system requirements, as wxPython 4.2.x supports 3.9-3.14 but not or other implementations without custom builds. If issues persist, consult the build log generated by (via --verbose flag) to identify specific missing components.

Usage

Basic Application Structure

A wxPython application fundamentally revolves around an instance of the wx.App class, which manages the application's lifecycle, initializes the underlying library, and orchestrates the event loop. Developers typically subclass wx.App to customize initialization by overriding the OnInit method, where essential setup occurs before the becomes responsive. This method should return True to indicate successful initialization, allowing the application to proceed; returning False terminates the app early. The primary user interface element is created using wx.Frame, which serves as the top-level window. In OnInit, a wx.Frame instance is constructed with parameters such as the parent window (usually None for the main frame), a window ID (often wx.ID_ANY for automatic assignment), a title string, and an initial size tuple (e.g., (300, 200) for width and height in pixels). Once configured, the frame is made visible by calling its Show() method, ensuring it appears on screen. The application instance is then set as the top window via SetTopWindow(frame) to enable proper management. To commence event processing, the application's MainLoop() method is invoked after setup, entering an infinite loop that dispatches user events, timers, and other interactions until the application exits (e.g., via window closure). Cleanup, such as destroying windows, occurs automatically upon loop termination. For robustness, best practices include wrapping MainLoop() in a try-except block to catch and handle uncaught exceptions, preventing abrupt crashes and allowing for logging or user-friendly error messages. Additionally, the wx.App constructor's redirect parameter can be set to True to redirect stdout and stderr to a or file, aiding in without console dependency. The following minimal code template illustrates the basic structure:
python
import wx

class MyApp(wx.App):
    def OnInit(self):
        frame = wx.Frame(None, wx.ID_ANY, "Minimal wxPython App", size=(300, 200))
        frame.Show()
        self.SetTopWindow(frame)
        return True

if __name__ == "__main__":
    app = MyApp(redirect=False)
    try:
        app.MainLoop()
    except Exception as e:
        print(f"Application error: {e}")
This skeleton provides a functional empty window and can be extended by populating the frame with widgets.

Event Handling and Examples

In wxPython, the event system allows applications to respond to user interactions and system notifications through a mechanism based on the wx.EvtHandler class, from which most GUI components derive. Events such as button clicks, key presses, and window resizes are bound to handler functions using the Bind method, which supports dynamic attachment at runtime; for instance, self.Bind(wx.EVT_BUTTON, self.on_click, self.button) associates a button click with the on_click method. Alternatively, the older Connect method can be used for static bindings during widget creation, though Bind is preferred for its flexibility in modern wxPython applications. Event handlers are callback functions or methods that receive an event object as a parameter, enabling access to details like the source or event type; a typical handler might be defined as def on_key_press(self, event): print(event.GetKeyCode()), where event is an instance of wx.KeyEvent for key presses. These handlers can be unbound dynamically with Unbind to manage event flow during application runtime. Events propagate up the parent-child hierarchy unless explicitly stopped, with command events (like button clicks) traveling to ancestors by default while basic events remain local to the originating window. To allow further processing by other handlers, the event.Skip() method is called within a handler, passing the event to the next in the chain; custom event classes can be derived from wx.Event or wx.CommandEvent to carry additional data and control propagation. A simple example of event handling is a button-click counter application, which demonstrates binding, handler execution, and UI updates. The code creates a frame with a button and a static text label to display the count:
python
import wx

class CounterFrame(wx.Frame):
    def __init__(self):
        super().__init__(parent=None, title="Click Counter")
        self.count = 0
        panel = wx.Panel(self)
        self.button = wx.Button(panel, label="Click Me")
        self.label = wx.StaticText(panel, label="Clicks: 0")
        
        sizer = wx.BoxSizer(wx.VERTICAL)
        sizer.Add(self.button, 0, wx.ALL, 10)
        sizer.Add(self.label, 0, wx.ALL, 10)
        panel.SetSizer(sizer)
        
        self.Bind(wx.EVT_BUTTON, self.on_click, self.button)
    
    def on_click(self, event):
        self.count += 1
        self.label.SetLabel(f"Clicks: {self.count}")
        event.Skip()  # Optional: allows further propagation if needed

if __name__ == "__main__":
    app = wx.App()
    frame = CounterFrame()
    frame.Show()
    app.MainLoop()
This example binds wx.EVT_BUTTON to the on_click handler, increments a counter on each click, and updates the , illustrating event-driven interaction. For advanced usage, events enable periodic tasks via wx.Timer, which generates wx.TimerEvent instances at specified intervals. A is created, bound to wx.EVT_TIMER, and started with timer.Start(1000) for a 1-second repeat; the handler might update a clock , as in def on_timer(self, event): self.[label](/page/Label).SetLabel(time.strftime("%H:%M:%S")). Custom events facilitate inter-component communication, such as in threaded operations, by using wx.lib.newevent.NewEvent() to define a new event type (e.g., MyEvent, EVT_MY_EVENT = NewEvent()), binding it with Bind(EVT_MY_EVENT, handler), and posting via wx.PostEvent(target, MyEvent()) to notify listeners asynchronously.

Licensing

License Terms

wxPython is licensed under the wxWindows Library Licence (WXWL), 3.1, which is an OSI-approved designed specifically for . This is fundamentally based on the GNU Library General Public Licence (LGPL) 2 or later, but includes a special exception that permits the to be linked with , closed-source code without requiring the disclosure of the application's . As a result, developers can create and distribute commercial or proprietary applications using wxPython while complying with the 's terms. Key clauses in the WXWL emphasize free redistribution and modification of the library itself. Redistribution in source or is allowed without fees, provided the original notices, terms, and disclaimers are preserved. Modifications to the library are permitted, but any distributed modified versions must carry the same licensing conditions, including the special exception for linking. Dynamic linking is explicitly supported to preserve user freedoms, enabling the library to be combined with other software in ways that do not impose open-source requirements on the entire program. Unlike General Public Licence (GPL), which requires derivative works to be licensed under the GPL (a "viral" effect), the WXWL allows closed-source applications to incorporate the library via dynamic linking without affecting the application's licensing. The provides no warranty, disclaiming any implied warranties of merchantability or fitness for a particular purpose, and holds the authors harmless from liability arising from its use. Attribution requirements mandate that all distributions include a copy of the full text, the original , and a list of conditions and disclaimers. The license text itself may not be modified, ensuring consistency across implementations. This framework has remained consistent since its adoption in the late 1990s for the underlying toolkit, and the modern wxPython Phoenix project upholds the identical terms to maintain compatibility and developer freedoms.

Distribution and Compatibility

wxPython applications can be packaged into standalone executables using tools such as PyInstaller, which bundles the Python interpreter, wxPython wheels, and dependencies into a single distributable file for Windows, macOS, and . Similarly, cx_Freeze supports creating executables from wxPython scripts by specifying packages like "wx" in the setup configuration to include necessary modules. The wxWindows Library Licence permits binary distributions of wxPython-based applications under the developer's own terms, without requiring source code disclosure, as long as original and notices are preserved in the distributed files. This redistribution approach allows flexibility while ensuring compliance through retention of license documentation. License compatibility enables integration with , as well as open-source licenses like , , or GPL, due to the L-GPL structure with an exception that avoids the propagation of full GPL requirements. Packaging best practices involve deciding between dynamic linking, which requires bundling platform-specific binaries like DLLs to avoid runtime errors, and static linking, which embeds libraries for simpler distribution but results in larger files; the choice depends on balancing deployment ease and performance.

Applications

Notable Applications

is a prominent open-source application built with and wxPython, enabling users to organize personal tasks, subtasks, and todo lists while supporting features like effort tracking, categories, budgets, and notes for both simple and complex workflows. This cross-platform tool runs on Windows, macOS, and , leveraging wxPython's native look and feel to provide an intuitive interface for productivity needs. The (NOAA) has utilized wxPython in several specialized tools for environmental data processing and visualization, including wxmpl, which facilitates painless embedding of figures into wxPython applications for interactive plotting, and wxNUCOS, a for the NOAA Unit Converter for Oil Spills that supports unit conversions in modeling scenarios. These utilities demonstrate wxPython's effectiveness in scientific and utility software requiring graphical data handling. Early versions of the client, a widely used application, incorporated wxPython for its , allowing cross-platform deployment and contributing to its adoption in the 2000s. NVDA () is a free and open-source for Windows, designed to assist blind and vision-impaired computer users by providing audio feedback for screen content and keyboard input. Developed using and wxPython, NVDA offers a cross-platform native interface and has become one of the most widely used tools since its initial release in 2007. These examples highlight wxPython's longstanding role in developing robust, cross-platform applications for productivity, visualization, utilities, and since the early 2000s.

Use Cases and Ecosystem

wxPython finds primary application in developing cross-platform desktop tools, such as text editors and managers, where its native ensures seamless integration with the host operating system. It is also widely used for scientific applications, including plotting and tools that leverage Python's scientific libraries for complex datasets. Additionally, wxPython supports internal development, providing robust and scalable solutions for business applications across Windows, macOS, and . The wxPython ecosystem includes key resources for developers, such as the wxPython Wiki, which offers collaborative documentation, tutorials, examples, and how-to guides to facilitate learning and practical use of the toolkit. The official documentation serves as the primary API reference, detailing classes, methods, and migration guidance for version 4.x. Community support is available through forums like discuss.wxpython.org, where users discuss implementation, troubleshoot issues, and share solutions related to wxPython development. Extensions enhance wxPython's capabilities, with third-party libraries like wx.lib.agw providing advanced widgets such as custom-drawn controls that can replace or extend platform-native components for more sophisticated interfaces. Integration with libraries like and is common, enabling embedded plotting and data visualization within wxPython applications, as demonstrated in official Matplotlib examples that use wxPython backends for interactive figures and navigation tools. The wxPython community has been active since 1996, when the project was initially created as a Python wrapper for wxWidgets. Contributions occur primarily through GitHub, where the Phoenix repository serves as the main development hub for pull requests, bug reports, and enhancements by core maintainers and users. In comparisons with other Python GUI toolkits, wxPython is often preferred over Tkinter for its support of the native look and feel on each platform, avoiding Tkinter's distinct widget appearance that may not match system themes. Relative to PyQt, wxPython offers a lighter memory footprint due to smaller underlying libraries, making it suitable for non-commercial projects where deployment size and resource efficiency are priorities.

References

  1. [1]
    Overview of wxPython
    wxPython is a cross-platform GUI toolkit for the Python programming language. It allows Python programmers to create programs with a robust, highly functional ...
  2. [2]
    wxPython History
    wxPython's history started before the turn of the century, back in 1996. wxWidgets was already around 4 years old by then, you can see more details about the ...
  3. [3]
    wxPython Project Phoenix Migration Guide
    This document will describe some of the incompatibilities that programmers will run into when migrating code from Classic wxPython to the Phoenix.
  4. [4]
    wxPython Changelog
    The legacy, OSX-Only wx.webkit module has been removed. Fix building wxPython with Python 3.10 on Windows (#2016). Fix PyProgress on Windows by avoiding invalid ...
  5. [5]
    wxPython 4.2.4 Released
    Oct 28, 2025 · wxPython 4.2.4 is now available at PyPI, with some additional files at Extras. Changes in this release: This release was built using the ...
  6. [6]
    wxWidgets/Phoenix: wxPython's Project Phoenix. A new ... - GitHub
    Welcome to wxPython's Project Phoenix! Phoenix is the improved next-generation wxPython, "better, stronger, faster than he was before.Issues · Pull requests 21 · Security · Releases 7
  7. [7]
    wx.App — wxPython Phoenix 4.2.3 documentation
    ### Summary of wx.App Role in Event Loop Management and Dispatching
  8. [8]
  9. [9]
  10. [10]
    ProjectPhoenix/ProjectGoals - wxPyWiki - wxPython Wiki
    Oct 27, 2010 · Another SWIG option is to write a new code generation module for it that builds Python extension types like SIP does. Could use PWIG (http:// ...
  11. [11]
    wxPython 4.0.0a1 - PyPI
    Welcome to wxPython's Project Phoenix! Phoenix is the improved next-generation wxPython, “better, stronger, faster than he was before.
  12. [12]
    What wxPython version for what Python
    May 6, 2022 · None of the pypi-published wxPython versions support Python 3.10. You'll have to install one of the snapshot builds: https://wxpython.org ...
  13. [13]
    wxPython 4.2.3 Released
    Apr 9, 2025 · wxPython 4.2.3 is now available at PyPI, with some additional files at Extras. Changes in this release:Missing: future plans
  14. [14]
    wxPython - PyPI
    Archive files containing a copy of the wxPython documentation, the demo and samples, and also a set of MSVC .pdb files for Windows are available here. The ...
  15. [15]
    wxPython API Documentation — wxPython Phoenix 4.2.3 ...
    This is the API reference documentation for the 4.2.3 release of wxPython Phoenix, built on 10 April 2025.WxWx Overview DocumentsWx FunctionswxPython Phoenix 4.2.5a1 ...Thumbnail gallery
  16. [16]
    wxPython fails to build on free threaded python 3.13t due to ... - GitHub
    Feb 20, 2025 · wxPython fails to build on free threaded python 3.13t due to __pyx_vectorcallfunc related error in nanosvg-extension (from source, no wheel available)Missing: future | Show results with:future
  17. [17]
    wx.html2.WebView — wxPython Phoenix 4.2.3 documentation
    This control may be used to render web (HTML / CSS / javascript) documents. It is designed to allow the creation of multiple backends for each port.
  18. [18]
    Linux wheels with manylinux2010 - Discuss wxPython
    Sep 26, 2019 · there is now a cibuildwheel available pretty easily on GitHub Actions that makes it pretty easy to use manylinux without handling docker ...
  19. [19]
    wxWidgets: Cross-Platform GUI Library
    ### Summary of wxWidgets Platform Support and Backends
  20. [20]
  21. [21]
  22. [22]
    High DPI Overview — wxPython Phoenix 4.2.3 documentation
    To prevent this from happening, most platforms automatically scale the windows by the scaling factor, defined above, when displaying them on high DPI displays.Missing: cross- | Show results with:cross-
  23. [23]
    Support for High DPI on Windows 10 - Discuss wxPython
    Jul 17, 2018 · Hey there, So, I've had some users complain about scaling issues on Windows. I understand that support for scaling on Windows is kinda iffy ...Missing: cross- | Show results with:cross-
  24. [24]
    wxPython Downloads
    The wxPython source archive and, for supported platforms, wxPython binary wheels are available from the Python Package Index (PyPI).
  25. [25]
    wx.Button — wxPython Phoenix 4.2.3 documentation
    ### Official Brief Description of wx.Button
  26. [26]
    wx.TextCtrl — wxPython Phoenix 4.2.3 documentation
    ### Official Brief Description of wx.TextCtrl
  27. [27]
    wx.ListCtrl — wxPython Phoenix 4.2.3 documentation
    ### Official Brief Description of wx.ListCtrl
  28. [28]
    wx.Panel — wxPython Phoenix 4.2.3 documentation
    ### Official Brief Description of wx.Panel
  29. [29]
    wx.MenuBar — wxPython Phoenix 4.2.3 documentation
    ### Summary of wx.MenuBar from https://docs.wxpython.org/wx.MenuBar.html
  30. [30]
    wx.ToolBar — wxPython Phoenix 4.2.3 documentation
    ### Official Brief Description of wx.ToolBar
  31. [31]
  32. [32]
    wx.FileDialog — wxPython Phoenix 4.2.3 documentation
    wx.FileDialog represents the file chooser dialog. It uses wildcards to filter files and can be used for open or save dialogs.Missing: unified menus
  33. [33]
    wx.Notebook — wxPython Phoenix 4.2.3 documentation
    ### Summary of wx.Notebook from Official Docs
  34. [34]
    wx.Sizer — wxPython Phoenix 4.2.3 documentation
    ### Official Brief Description of wx.Sizer and Its Subclasses
  35. [35]
  36. [36]
  37. [37]
    Sizers Overview — wxPython Phoenix 4.2.3 documentation
    Sizers in wxPython define control layouts in dialogs, creating platform-independent layouts by querying subwindows for their minimal size and stretching ...Sizers Overview¶ · Wx. Sizers - The Visual... · The Flags And Border...
  38. [38]
    wx.DC — wxPython Phoenix 4.2.3 documentation
    ### Summary of wx.DC for Drawing Support
  39. [39]
    wx.Image — wxPython Phoenix 4.2.3 documentation
    ### Summary of wx.Image for Image Handling
  40. [40]
    wx.html.HtmlWindow — wxPython Phoenix 4.2.3 documentation
    wx.html.HtmlWindow uses the wx.Image class for displaying images, so you need to initialize the handlers for any image formats you use before loading a page.
  41. [41]
    CreatingCustomControls - wxPyWiki - wxPython Wiki
    Sep 10, 2011 · I am going to describe how to create a custom control in wxPython. In this article's respect, custom control means "owner-drawn".
  42. [42]
    wxWidgets/wxWidgets: Cross-Platform C++ GUI Library - GitHub
    wxWidgets is a free and open source cross-platform C++ framework for writing advanced GUI applications using native controls.wxWidgets · Releases · Issues 2.2k · ActionsMissing: architecture abstraction layers
  43. [43]
  44. [44]
    Prerequisites - WxWiki - wxWidget's Wiki
    Oct 19, 2018 · You will need to have a compiler supported by wxWidgets. On Unix, you will most likely have a version of gcc installed. On Windows you should have MS Visual C+ ...
  45. [45]
  46. [46]
    Building wxPython for Linux via Pip
    Aug 17, 2017 · In order to deploy to linux systems wxPython4 (Phoenix) simply builds itself from a source tarball as part of the pip setup process.Missing: cibuildwheel | Show results with:cibuildwheel<|control11|><|separator|>
  47. [47]
    Getting Started - wxPyWiki - wxPython Wiki
    Aug 7, 2017 · In this tutorial we are going to build a simple text editor. In the process, we will explore several widgets, and learn about features such as events and ...
  48. [48]
    Events and Event Handling — wxPython Phoenix 4.2.3 documentation
    There is one principal way to handle events in wxPython, which uses the wx.EvtHandler.Bind call and can be used to bind and unbind the handlers dynamically.Missing: architecture | Show results with:architecture
  49. [49]
    wx.Event — wxPython Phoenix 4.2.3 documentation
    This method can be used inside an event handler to control whether further event handlers bound to this event will be called after the current one returns.
  50. [50]
    wx.EvtHandler — wxPython Phoenix 4.2.3 documentation
    wx.EvtHandler is a class that can handle events from the windowing system. All window classes are derived from this class.
  51. [51]
    wx.Timer — wxPython Phoenix 4.2.3 documentation
    Returns the current owner of the timer. If not None this is the event handler which will receive the timer events (see wx.TimerEvent) when the timer is running.
  52. [52]
    wx.lib.newevent — wxPython Phoenix 4.2.3 documentation
    ### Summary: Creating and Using Custom Events in wxPython
  53. [53]
    License | wxPython
    wxWindows Library Licence, Version 3.1 ====================================== Copyright (c) 1998-2005 Julian Smart, Robert Roebling et al Everyone is permitted ...
  54. [54]
  55. [55]
  56. [56]
    cx_freeze - wxPyWiki - wxPython Wiki
    Jul 24, 2009 · Using cx_freeze to freeze your application. The following will explain how to freeze a Python/wxPython application using the cx_freeze tool.Special Concerns · The Setup.Py · The Ms Manifest
  57. [57]
    Static vs Dynamic exe's and static vs shared libs
    Aug 20, 2023 · The difference between using the static and shared libs is that when the exe is linked it either takes all the static lib and embeds it or takes only the ...Wx lib GUI App: build it static or dynamic? - The wxWidgets forumHow to switch between static and dynamic link?More results from forums.wxwidgets.org
  58. [58]
    taskcoach/taskcoach: Task Coach (forked from http://hg ... - GitHub
    Task Coach is a desktop application, developed in Python and using wxPython for its GUI. Task Coach is more or less developed using the Model-View-Controller ...
  59. [59]
    Task Coach download | SourceForge.net
    Rating 4.8 (98) · FreeTask Coach is a free open source todo manager. It grew out of frustration about other programs not handling composite tasks well.Missing: statistics | Show results with:statistics
  60. [60]
    NOAA-ORR-ERD/wxmpl: Painless matplolib embedding for wxPython
    The `wxmpl' module provides an matplotlib `FigureCanvas' with user-interaction features like point-under-cursor and zooming in on a selected area.
  61. [61]
    NOAA-ORR-ERD/wxNUCOS: wxPython based GUI For the ... - GitHub
    wxPython based graphical user interface for the NOAA Unit Converter for Oil Spills. Installation wxNUCOS depends on the wxPython GUI framework, and the pynucos ...
  62. [62]
    wxPythonPit Apps - wxPyWiki - wxPython Wiki
    Feb 2, 2018 · Bittorrent. BitTorrent's software client allows you to quickly download high-quality digital content. BitTorrent Open Source License ; BTManager.Open Source · Programming: Editors, IDE's... · Internet · Miscellaneous
  63. [63]
    wxPython Screenshots
    It also provides many tools for organizing complex data sets and processing and analyzing arrays of scientific data. dicompyler. /screenshots/dicompyler ...Missing: desktop | Show results with:desktop<|separator|>
  64. [64]
    wxPython Wiki
    Aug 15, 2019 · The wxPyWiki is a collaborative document for wxPython, providing documentation, examples, and how-tos to help people learn and use wxPython.wxPython by Example · Getting Started · How to Learn wxPython · wxPython DemoMissing: ecosystem forums discuss.
  65. [65]
    Discuss wxPython - wx folks helping wx folks
    All about wxPython, the GUI toolkit for Python.
  66. [66]
    wx.lib.agw — wxPython Phoenix 4.2.3 documentation
    Jan 9, 2014 · This is the Advanced Generic Widgets package (AGW). It provides many custom-drawn wxPython controls: some of them can be used as a replacement of the platform ...Missing: third- party extensions NumPy integration
  67. [67]
    Embed in wx #5 — Matplotlib 3.10.7 documentation
    Embed in wx #5#. import wx import wx.lib.agw.aui as aui import wx.lib.mixins.inspection as wit from matplotlib.backends.backend_wxagg import ...
  68. [68]
    Frequently Asked Questions - wxPyWiki - wxPython Wiki
    Jun 17, 2009 · wxPython supports the native look and feel of the platform being used. tkInter has its own look and feel for some components, which doesn't ...Missing: appearance | Show results with:appearance
  69. [69]
    Moving to PyQt - Eli Bendersky's website
    Jan 19, 2009 · The wx DLLs are smaller than Qts, so the memory footprint is smaller for wx apps [4]. Also the executables "compiled" with Pyinstaller/py2exe ...