JavaFX
A Java platform for building RIAs which can run across a variety of connected
devices
pyjamas
An AJAX-based port of the Google Web Toolkit to Python, which comes with
a set of interface widgets and compiles Python code that uses those widgets
into JavaScript, to be run in a browser on a client
The HTML5 standard under development proposes to address this domain as well.
Web browsers ultimately are “desktop” GUI applications, too, but are more per-
vasive than GUI libraries, and can be generalized with RIA tools to render other
GUIs. While it’s possible to build a widget-based GUI with such frameworks, they
can also add overheads associated with networking in general and often imply a
substantially heavier software stack than traditional GUI toolkits. Indeed, in order
to morph browsers into general GUI platforms, RIAs may imply extra software
layers and dependencies, and even multiple programming languages. Because of
that, and because not everyone codes for the Web today (despite what you may
have heard), we won’t include them in our look at traditional standalone/desktop
GUIs in this part of the book.
See the Internet part for more on RIAs and user interfaces based on browsers, and
be sure to watch for news and trends on this front over time. The interactivity these
tools provide is also a key part of what some refer to as “Web 2.0” when viewed
more from the perspective of the Web than GUIs. Since we’re concerned with the
latter here (and since user interaction is user interaction regardless of what jargon
we use for it), we’ll postpone further enumeration of this topic until the next part
of the book.
Platform-specific options
Besides the portable toolkits like tkinter, wxPython, and PyQt, and platform-
agnostic approaches such as RIAs, most major platforms have nonportable options
for Python-coded GUIs as well. For instance, on Macintosh OS X, PyObjC provides
a Python binding to Apple’s Objective-C/Cocoa framework, which is the basis for
much Mac development. On Windows, the PyWin32 extensions package for Py-
thon includes wrappers for the C++ Microsoft Foundation Classes (MFC) frame-
work (a library that includes interface components), as well as Pythonwin, an MFC
sample program that implements a Python development GUI. Although .NET
technically runs on Linux, too, the IronPython system mentioned earlier offers
additional Windows-focused options.
See the websites of these toolkits for more details. There are other lesser-known GUI
toolkits for Python, and new ones are likely to emerge by the time you read this book
(in fact, IronPython was new in the third edition, and RIAs are new in the fourth).
Moreover, packages like those in this list are prone to mutate over time. For an up-to-
date list of available tools, search the Web or browse http://www.python.org and the
PyPI third-party packages index maintained there.
362 | Chapter 7: Graphical User Interfaces