Skip to main content

utilities and conveniences for wxPython

Project description

wxutils provides wxPython utilities and convenience functions. The wxutils library is a small collection of functions and classes, and is by no means comprehensive.

The aim is to simplify code, reduce boiler-plate, make wxPython coding a bit more python-like, and prevent repeating code across several projects.

The largest share of classes in wxutils are simplified versions of wxPython widgets with limited but common attributes and patterns. For example:

btn = wxutils.Button(parent, label, action=action, **kws)

binds a callback function (the “action”) to a wx.Button, corresponding to:

b = wx.Button(parent, label=label, **kws)
if callable(action):
    parent.Bind(wx.EVT_BUTTON, action, b)

Yes, this can be viewed as merely a convenience, and not completely general. But it is a remarkably common pattern (at least in my code), replaces 3 lines with 1, and hides the ugliest parts of wxPython.

There are several similar convenience widgets, including Check, Choice, and SimpleText (a simplified variant of StaticText), MenuItem, Font, HLine, OkCancel, HyperText.

In addition, there are more complex widgets, such as

  • FloatCtrl a wx.TextCrtl that allows numerical input only. Precision, upper bound, and lower bound can be set, and a callback can be bound to the control.

  • NumericCombo wx.ComboBox with a FloatCtrl

  • EditableListBox a list box with a built-in popup menu to arrange order of the items with “move up/down, to top, to bottom”

  • YesNo a wx.Choice of only ‘No’ and ‘Yes’

  • GridPanel a combined GridBagSizer and Panel that simplifies adding widgets to a GridBagSizer.

  • FileOpen, FileSave wrappers (supporting wildcards) to FileDialog.

And some other miscellaneous stuff as well. Yeah, it’s sort of a motley collection.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wxutils-0.3.5.tar.gz (69.8 kB view details)

Uploaded Source

Built Distribution

wxutils-0.3.5-py3-none-any.whl (68.3 kB view details)

Uploaded Python 3

File details

Details for the file wxutils-0.3.5.tar.gz.

File metadata

  • Download URL: wxutils-0.3.5.tar.gz
  • Upload date:
  • Size: 69.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for wxutils-0.3.5.tar.gz
Algorithm Hash digest
SHA256 9fbb179e8be6bdf971f433929b3be9fde2a7afdda970ff3bbd96e890ff10cec6
MD5 b2915f9676f957c4388e188adacce66b
BLAKE2b-256 59d1d5dd28a9f2275fc4ffa6419d98d08dfb0b9d87dd24f5d199ce99aa9e524f

See more details on using hashes here.

File details

Details for the file wxutils-0.3.5-py3-none-any.whl.

File metadata

  • Download URL: wxutils-0.3.5-py3-none-any.whl
  • Upload date:
  • Size: 68.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for wxutils-0.3.5-py3-none-any.whl
Algorithm Hash digest
SHA256 ad1896ffd3c468bcf33c219a74cca51f4a5c5eec17682c8596da960b6abc36e2
MD5 f160621ecc975aab64c5b06547309e93
BLAKE2b-256 f16e501e11ac145ec679955c431b6aa9554b6c0f7b90b65fa9ecce6f364b4650

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page