Overview
WAX is a high-level Python GUI framework built on top of wxPython. It aims to simplify the wxPython API and make GUI programming more accessible to developers, providing cleaner and more Pythonic syntax.
Key features
- Simplifies wxPython API
- Leverages native components for cross-platform applications
- Focuses on ease of use and rapid development
- Powerful layout management
- Provides a cleaner syntax for building GUIs
Common use cases
- Desktop applications with native look and feel
- Rapid prototyping of GUI applications
- Applications needing simplified access to wxPython features
- Educational purposes for GUI-based applications
- Tools and utilities for cross-platform environments
Installation
# WAX is not actively maintained or available on PyPI # Installation usually involves manually downloading sources, ensure wxPython is installed pip install wxPython
Example
# Simple example assumes installation of WAX and wxPython
# Please adjust imports based on the way WAX was installed
import wax.core
from wax.core import Application, Frame, Panel, Button
class MainFrame(Frame):
def __init__(self):
super().__init__(title="Hello WAX")
panel = Panel(self)
button = Button(panel, label="Click me", event=self.on_click)
panel.AddComponent(button, expand='both')
panel.Pack()
self.AddComponent(panel, expand='both')
self.Pack()
def on_click(self, event):
print("Button clicked!")
app = Application(MainFrame)
app.Run()