[SciPy-dev] Python (Enthought Edition) for Windows test release

Fernando Perez Fernando.Perez at colorado.edu
Fri Jan 21 01:52:59 CST 2005

John Hunter wrote:

>     Joe> - matplotlib
> Hi Joe -- excellent work.  I recommend one important change to the
> matplotlib configuration file .matplotlibrc (which resides in the same
> directory as setup.py and ultimately gets placed in
> C:\Python23\share\.matplotlibrc.  The default backend in the src
> tarball which you used is GTKAgg, which doesn't work in the default
> enthon install because pygtk is not available.  I suggest changing
> this to either TkAgg or WXAgg.  Since most of the enthon tools default
> to wx, perhaps WXAgg is the natural choice.  Eg, the line in
> .matplotlibrc should read
> backend      : WXAgg    # the default backend
> I tested enthon matplotlib with tkagg, wxagg and ran my suite of
> example figure drivers for the image backends (PNG/PS/SVG) and it
> passed with flying colors.

Just curious: did you test this from a normal terminal or from ipython -pylab? 
  I ask because I was just trying to help a colleague get going with Enthon, 
and starting ipython -pylab with the WXAgg backend gave me a nasty ipython 
crash, related to signal handling.  Unfortunately I didn't have time to 
investigate, since I was supposed to help him with other things.  I just set 
the default backend to TkAgg and moved on.

The error, as far as I remember, was a SystemError exception when attempting 
to install a SIGINT handler by runcode.  In Shell.py:

     def runcode(self):
         """Execute a code object.

         Multithreaded wrapper around IPython's runcode()."""

         # lock thread-protected stuff

         # Install sigint handler
         signal.signal(signal.SIGINT, sigint_handler)

this works just fine under Linux (though it's an unpleasant hack), but 
apparently it breaks something in Windows.  I know signal handling is not a 
cross-platform-frienly problem...  If this really breaks things for windows 
users, I'd appreciate if someone could test (keeping the WXAgg backend), 
changing the above to:

         # Install sigint handler
             signal.signal(signal.SIGINT, sigint_handler)
         except SystemError:

If that helps, then we can use this for protecting windows users so they can 
use ipython/pylab with WX, which is probably the preferred combination for 
Windows users (native widgets and all).

Sorry to offload debugging on others, but I have nowhere to test this, and I'm 
just working from memory from the traceback I saw fly by on my friend's screen.



More information about the Scipy-dev mailing list