[SciPy-user] Re: Enthought python

Ryan Krauss ryanfedora at comcast.net
Wed Jul 20 11:20:20 CDT 2005


Fernando's suggestion works quite well and I can run mayavi and 
matplotlib in the same session with the TkAgg backend.  I was using the 
WXAgg backend as my default for matplotlib because the TkAgg seems to 
chew up a lot more ram (I am running Windows XP) and is slightly slower 
when calling show(). 

Thanks to Fernando and Prabhu for getting me through this.

Ryan

Fernando Perez wrote:

> Ryan Krauss wrote:
>
>> Thanks again.  Running Ipython without any switches gets rid of that 
>> error.
>>
>> I normally run Ipython with the -pylab switch for 2d plotting.  It 
>> would be great not to have to run seperate sessions for 2d and 3d 
>> visualization.  Is there any way we can make this work with the 
>> -pylab switch?
>
>
> The problem is that mayavi is a Tk app, and you probably have GTK, WX 
> or Qt as your pylab backend.  That means conflicting thread models 
> (unless you are in debian, where the libs have enough thread support 
> that ipython can make them all dance together).
>
> When you use -pylab, ipython will magically configure its threading 
> model to match your ~/.matplotlibrc choice.  But when you run mayavi, 
> you'll have problems.  The easiest solution (which is what I use, 
> given that I need both matplotlib and mayavi) is to run matplotlib 
> with the TkAgg backend as your default.  In that case you gain:
>
> - no threading conflicts of any kind (everything is Tk)
>
> - the ability to stop a long computation via Ctrl-C.  This can't be 
> done with any of the other backends, because the code and the 
> interface have to run in different threads and there is no way in 
> python to send signals across threads.
>
> Cheers,
>
> f
>
> _______________________________________________
> SciPy-user mailing list
> SciPy-user at scipy.net
> http://www.scipy.net/mailman/listinfo/scipy-user
>



More information about the SciPy-user mailing list