Category Archives: Enable

Enthought Tool Suite Release 4.4 (Traits, Chaco, and more)

Authors: The ETS Developers

We’re happy to announce the release of multiple major projects, including:

  • Traits 4.4.0
  • Chaco 4.4.1
  • TraitsUI 4.4.0
  • Envisage 4.4.0
  • Pyface 4.4.0
  • Codetools 4.2.0
  • ETS 4.4.1

These packages form the core of the Enthought Tool Suite (ETS,, a collection of free, open-source components developed by Enthought and our partners to construct custom scientific applications. ETS includes a wide variety of components, including:

  • an extensible application framework (Envisage)

  • application building blocks (Traits, TraitsUI, Enaml, Pyface, Codetools)

  • 2-D and 3-D graphics libraries (Chaco, Mayavi, Enable)

  • scientific and math libraries (Scimath)

  • developer tools (Apptools)

You can install any of the packages using Canopy‘s package manager, using the Canopy or EPD ‘enpkg \’ command, from PyPI (using pip or easy_install),  or by building them from source code on github. For more details, see the ETS intallation page.



This set of releases was an 8-month effort of Enthought developers along with:

  • Yves Delley
  • Pieter Aarnoutse
  • Jordan Ilott
  • Matthieu Dartiailh
  • Ian Delaney
  • Gregor Thalhammer

Many thanks to them!

General release notes


  1. The major new feature in this Traits release is a new adaptation mechanism in the “traits.adaptation“ package.  The new mechanism is intended to replace the older traits.protocols package.  Code written against “traits.protocols“ will continue to work, although the “traits.protocols“ API has been deprecated, and a warning will be logged on first use of “traits.protocols“.  See the ‘Advanced Topics’ section of the user manual for more details.

  2. These new releases of TraitsUI, Envisage, Pyface and Codetools include an update to this new adaptation mechanism.

  3. All ETS projects are now on TravisCI, making it easier to contribute to them.

  4. As of this release, the only Python versions that are actively supported are 2.6 and 2.7. As we are moving to future-proof ETS over the coming months, more code that supported Python 2.5 will be removed.

  5. We will retire since it is lightly used and are now recommending all users of Chaco to send questions, requests and comments to or to StackOverflow (tag “enthought” and possibly “chaco”).

More details about the release of each project are given below. Please see the CHANGES.txt file inside each project for full details of the changes.

Happy coding!

The ETS developers

Traits 4.4.0 release notes


The Traits library enhances Python by adding optional type-checking and an event notification system, making it an ideal platform for writing data-driven applications.  It forms the foundation of the Enthought Tool Suite.

In addition to the above-mentioned rework of the adaptation mechanism, the release also includes improved support for using Cython with `HasTraits` classes, some new helper utilities for writing unit tests for Traits events, and a variety of bug fixes, stability enhancements, and internal code improvements.

Chaco 4.4.0 release notes


Chaco is a Python package for building efficient, interactive and custom 2-D plots and visualizations. While Chaco generates attractive static plots, it works particularly well for interactive data visualization and exploration.

This release introduces many improvements and bug fixes, including fixes to the generation of image files from plots, improvements to the ArrayPlotData to change multiple arrays at a time, and improvements to multiple elements of the plots such as tick labels and text overlays.

TraitsUI 4.4.0 release notes


The TraitsUI project contains a toolkit-independent GUI abstraction layer, which is used to support the “visualization” features of the Traits package. TraitsUI allows developers to write against the TraitsUI API (views, items, editors, etc.), and let TraitsUI and the selected toolkit and back-end take care of the details of displaying them.

In addition to the above-mentioned update to the new Traits 4.4.0 adaptation mechanism, there have also been a number of improvements to drag and drop support for the Qt backend and some modernization of the use of WxPython to support Wx 2.9.  This release also includes a number of bug-fixes and minor functionality enhancements.

Envisage 4.4.0 release notes


Envisage is a Python-based framework for building extensible applications, providing a standard mechanism for features to be added to an

application, whether by the original developer or by someone else.

In addition to the above-mentioned update to the new Traits 4.4.0 adaptation mechanism, this release also adds a new method to retrieve a service that is required by the application and provides documentation and test updates.

Pyface 4.4.0 release notes


The pyface project provides a toolkit-independent library of Traits-aware widgets and GUI components, which are used to support the “visualization” features of Traits.

The biggest change in this release is support for the new adaptation mechanism in Traits 4.4.0. This release also includes Tasks support for Enaml 0.8 and a number of other minor changes, improvements and bug-fixes.

Codetools release notes


The codetools project includes packages that simplify meta-programming and help the programmer separate data from code in Python. This library provides classes for performing dependency-analysis on blocks of Python code, and Traits-enhanced execution contexts that can be used as execution namespaces.

In addition to the above-mentioned update to the new Traits 4.4.0 adaptation mechanism, this release also includes a number of modernizations of the code base, including the consistent use of absolute imports, and a new execution manager for deferring events from Contexts.

ETS 3.6 and github

Last week, we released the Enthought Tool Suite 3.6. John Wiggins made many improvements and bug fixes to Kiva, Enable, and Chaco. And thanks to Evan Patterson, the TraitsBackendQt now supports PySide (as well as PyQt4).

We are also happy to announce that immediately after the release, the ETS repository was moved from subversion to git, and is now hosted on github.

This new ETS will be included in EPD 7.0, which is Python 2.7-based and is scheduled to be released on February 8.

Gradients in Enable

A little while ago I added basic support for gradients in Kiva (and thus Enable). Its been slowly improving, and I think its at a point where it should be shared with a greater audience. Kiva now supports linear and radial gradients as path fills. My goal is to support the majority of what the SVG spec requires, currently we pass about 1/2 to 2/3 of the compliance tests.

I have added a couple of full examples in Enable/examples/kiva, here is an excerpt:
[sourcecode language=”python”]
# colors are 5 doubles: offset, red, green, blue, alpha
starting_color = numpy.array([0.0, 1.0, 1.0, 1.0, 1.0])
ending_color = numpy.array([1.0, 0.0, 0.0, 0.0, 1.0])

# diagonal
numpy.array([starting_color, ending_color]),
That is all the code required to draw a rectangle with a diagonal gradient. And here is a screenshot of the example I took this from:

kiva gradient screenshot

Revamped Plot Toolbar

Last October I added a toolbar for Chaco plots. It was functional, but it wasn’t very pretty. I decided to rewrite it from scratch, with emphasis on improving the appearance and improving the auto-hide feature.

The new toolbar also employs a new feature to Enable: gradients! Gradient support is still a work in progress, but improving daily.

PlotToolbar example screenshot

Plotting and status indicators

A while ago I was working on an app, where I often got empty plots. It was completely valid for the plot to be empty, though often an empty plot was the result of an error in the code. Unfortunately, there was no easy way to indicate which condition was causing the empty plot without watching the console.

There were a couple of methods I could use:

  1. Show the log file in the UI
  2. Add a status indicator to the UI

There are a number of problems showing the log file: it takes up a lot of screen real estate, it is not obvious any particular log entry is the cause, and the log entry may require knowledge of the application internals to decipher.

So once I decided that I wanted a status indicator in the IU, the follow up question is, where? I started looking at some of the apps I use most frequently: how does Firefox indicate an error? It shows a little icon in the bottom right corner. I had never noticed it until I started looking for it, which makes it a bad example to me. In comparison, Google Chrome gives you a nice image and error message right where your eyes are focused (in the document pane). Right away the user knows there is an error.

I started thinking about how to display status indicators on Chaco plots. All of the framework was already in place, all that was needed was an Overlay class which could display an image. I decided to use SVG images rather than PNG’s so they can be scaled depending on the size of the plot, though I might be convinced to allow other image formats as well as text.

This screenshot is from the example. The code (and images) should be considered a work in progress, though it is stable enough to begin using. For those that try it out, there is a nice fade effect too.

chaco erroroverlay

Using Cairo to render SVG in Enable

A few months ago Bryan Cole added the start of a Cairo based backend for Kiva. I’ve been fighting with Agg for several SVG related features and thought Cairo might be a good subsitute for rendering SVG’s. For most of our rendering needs, Cairo is about 4x slower than Agg, so its not a good general replacement, but for the SVG editor it might be okay. I took the initial work done, which only rendered to images, hacked it a bit, and go it into an Enable canvas. There is still a lot of work to be done, and this is the first time I’ve looked at Cairo at all, so if anyone wants to help out, please do. Anyway, without further ado, here is the SVG lion image:

Cairo rendered lion

If anyone knows how to get rid of the background rendering artifacts, please let me know.

Almost lickable: SVG button editor in Traits

I’ve been working on implementing a SVG renderer in ETS for the last 6 months, a little at a time. We (Enthought) hasn’t really made much noise about it because it is still pretty lacking. One of the goals is to replace WX’s terrible icon rendering with something much prettier. Although this is still very much a work in progress, I think we’re close enough to start showing it.


Lets assume your users are all 18 years old and have perfect eyesight, these 32×32 icons are a waste of space, lets try 16×16

16x16 button demo

Or maybe your users are a bit, um, older

128x128 button demo

The code couldn’t be any easier, its essentially a drop in replacement for the Traits Button class. If you’re living on the trunk, you are able to run this demo from the Enable/examples/savage directory.

A note about the icons in the demo: They come from the Oxygen icon set, Creative Commons 3.0 for the licenses wonks. They should have more color, but the renderer currently only supports 2 gradient stops, and these have gradients with significantly more stops.

SciPy 2008 Swarm

During the “State of SciPy” presentation that Jarrod Millman and I gave this year at the SciPy 2008 Conference, we showed a “code swarm” video that was put together by David Martin and Chris Galvan. It’s a first-of-it’s-kind, because it combines repositories from several projects; namely NumPy, SciPy, Mayavi, Chaco, Traits, and Matplotlib.

Among other things, you can see how the number of people involved and the level of code production has really accelerated over time.


Click Here for the Video