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.6.tar.gz (75.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wxutils-0.3.6-py3-none-any.whl (74.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for wxutils-0.3.6.tar.gz
Algorithm Hash digest
SHA256 d365e7c95feb0327ea65339ec4ff90d1502f4ea8cc8e9350c87fc6598f2b4af5
MD5 b47b7826b472de8c80028ae9bb61960e
BLAKE2b-256 3bf7c2828ed7ccfba3a997f46c588b77320ece63d691193c15be8bf5d5d2793c

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for wxutils-0.3.6-py3-none-any.whl
Algorithm Hash digest
SHA256 ac51e24e23c0081031a2ae8b77861e2ad395699617581b821e370b884aa6fa63
MD5 9edb1a4db3857c3a1427897ef7ed2073
BLAKE2b-256 4f2a1ca5303de6feeaf786eca56e3ee42e21c6e20cfb0d2a73e04a4e43d65c5b

See more details on using hashes here.

Supported by

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