[IPython-dev] potential pylab bug

Fernando Perez Fernando.Perez at colorado.edu
Thu Aug 26 23:17:00 EDT 2004


John Hunter wrote:
> First of all, I'm loving the new interactive shell.  For the first
> time in 2 years of using python every day, I'm trying to do almost
> everything interactively from the shell, including updating my package
> from ipython w/o restarting ipython!
> 
>   cd ~/some/dir
>   !sudo python setup.py install
>   reload somemodule
> 
> very nice....

Great!  I'm glad you're liking it.  In my group, the one person already using 
matplotlib full time is also loving it.  I'll bring some comments he has to 
your attention next week.  I think we have something very nice in our hands here.

> But I *may* have found a bug.  I have a script that produces an
> errobar plot which I'm calling with run in the pylab config .  The
> script imports matplotlib.matlab and nothing more.  On a call to
> errorbar, the ipython session hung.  I could not control-c it control
> control-z it.  A ps revealed
> 
>     hunter:~/python/projects/cluster/examples> ps
>     PID TTY          TIME CMD
>     29177 pts/0    00:00:00 tcsh
>     29381 pts/0    00:28:51 ipython
>     29405 pts/0    00:00:00 sh
>     29406 pts/0    00:00:00 gnuplot
>     29411 pts/0    00:00:00 ps
> 
>     hunter:~/python/projects/cluster/examples> killall -9 ipython
>     hunter:~/python/projects/cluster/examples> ps
>     PID TTY          TIME CMD
>     29177 pts/0    00:00:00 tcsh
>     29413 pts/0    00:00:00 ps
> 
> Note that gnuplot was running, and it was killed when I killed
> ipython!  Is it possible that there is some vestigial gnuplot support
> creaping in?

This is very strange.  The only way ipython can start gnuplot is if you import 
IPython.GnuplotRuntime or IPython.GnuplotInteractive.  The default numeric 
profile DOES load the gnuplot support, but pylab doesn't.  Here's an example:

[~]> pylab
Using IPython.Shell.IPShellMatplotlibWX with the WXAgg backend.
Python 2.2.3 (#1, Oct 15 2003, 23:33:35)
[GCC 3.3.1 20030930 (Red Hat Linux 3.3.1-6)] on linux2
Type "copyright", "credits" or "license" for more information.
(MatplotlibShell)

In [1]: !ps aux | grep gnuplot
fperez   20987  0.0  0.1  4928  572 pts/12   S    21:09   0:00 grep gnuplot

Try the same thing and let me know what you see.  Let me also know exactly how 
you are invoking ipython (which profile) and what your profile does.  Are you 
using the pylab profile as supplied by me, or did you modify it?

I'm also puzzled by the fact that ps shows 'ipython', instead of 'python'. 
ipython is not a binary, and on my system ps shows python.  Are you on a BSD 
or linux box (I don't know if they report differently)?

Best,

f

ps.  I just got your mail now (Thursday evening), but the date on it is 3 days 
ago.  I wonder if there's a problem with the scipy list server (I also just 
got a mail I sent to scipy-user earlier this afternoon, ~6 hours ago).




More information about the IPython-dev mailing list