ANN: wxPython

Robin Dunn robin at
Sun Sep 28 21:01:38 CEST 2008


The release of wxPython is now available for download at  This release adds support for using
Cairo for drawing on wx windows, adds a Win64 build, and various other
fixes and enhancements.

Source code is available, as well as binaries for Python 2.3, 2.4 and
2.5, for Windows and Mac, as well some packages for various Linux
distributions.  A summary of changes is listed below and also at

What is wxPython?

wxPython is a GUI toolkit for the Python programming language. It
allows Python programmers to create programs with a robust, highly
functional graphical user interface, simply and easily. It is
implemented as a Python extension module that wraps the GUI components
of the popular wxWidgets cross platform library, which is written in

wxPython is a cross-platform toolkit. This means that the same program
will usually run on multiple platforms without modifications.
Currently supported platforms are 32-bit and 64-bit Microsoft Windows,
most Linux or other Unix-like systems using GTK2, and Mac OS X 10.4+.
In most cases the native widgets are used on each platform to provide
a 100% native look and feel for the application.

Changes in

Many minor bug fixes throughout wxWidgets and wxPython.

Fixed wx.lib.embeddedimage to work with Python 2.3.

Fixed PseudoDC hit testing when pure white or pure black are used.

Added support for a 64-bit Windows build for the AMD64 architecture,
(a.k.a. x64.)  This is for Python 2.5 only and is available only as a
Unicode build.

Added the wx.EmptyBitmapRGBA factory function.

Added the wx.lib.wxcairo module which allows the pycairo package to be
used for drawing on wx window or memory DCs.  In addition it is able
to convert from a native wx.Font to a cairo.FontFace, and it also
provides functions for converting to/from wx.Bitmap and
cairo.ImageSurface objects.  In order to use this module you will need
to have the Cairo library and its dependencies installed, as well as
the pycairo Python package.  For Linux and other unix-like systems you
most likely have what you need installed already, or can easily do so
from your package manager application.  See the wx.lib.wxcairo
module's docstring for notes on where to get what you need for Windows
or Mac.  This module uses ctypes, and depending on platform it may
need to find and load additional dynamic libraries at runtime in
addition to cairo.  The pycairo package used needs to be new enough to
export the CAPI structure in the package namespace.  I believe that
started sometime in the 1.4.x release series.

Added the module, which is an implementation of the
wx.GraphicsContext API using Cairo (via wx.lib.wxcairo).  This allows
us to be totally consistent across platforms, and also use Cairo to
implement some things that are missing from the GraphicsContext API.
It's not 100% compatible with the GraphicsContext API, but probably
close enough to be able to share code between them if desired, plus it
can do a few things more.

Updated wx.Bitmap.CopyFromBuffer to be a bit more flexible. You can
now specify the format of the buffer, and the CopyFromBufferRGBA is
now just a wrapper around CopyFromBuffer that specifies a different
format than the default.  Also added the complement method,
CopyToBuffer.  See the docstring for CopyFromBuffer for details on the
currently allowed buffer formats.  The existing wx.BitmapFromBuffer
factory functions are also now implemented using the same underlying
code as CopyFromBuffer.

Add wx.lib.mixins.listctrl.ListRowHighlighter for automatic highlighting
of rows in a wx.ListCtrl.

Robin Dunn
Software Craftsman  Java give you jitters?  Relax with wxPython!

More information about the Python-announce-list mailing list