[IPython-user] ipython/matplotlib question

belinda thom bthom at cs.hmc.edu
Wed Dec 6 14:45:54 CST 2006


On Dec 4, 2006, at 1:03 PM, Robert Kern wrote:

> You need to make sure that the python executable in the #! line of  
> the main
> ipython script is pythonw2.4 (or equivalently, the full path to
> /Library/Frameworks/Python.framework/Versions/Current/Python), not  
> just python2.4.
>
> -- 
> Robert Kern

Thanks Robert.

I tried your suggestion, which is (partially) successful.

Upon changing the header in ipython:

   5 % head ipython
   #!/opt/local/bin/pythonw2.4
   # -*- coding: utf-8 -*-
   """IPython -- An enhanced Interactive Python
   [snip]

I get:

   4 % ipython
   tcsh: Unmatched ".

If i put simply "pythonw" in the top line, the same thing happens.

However, if I run:

   23 % pythonw /opt/local/bin/ipython -pylab
   Python 2.4.3 (#1, Nov  9 2006, 12:26:57)
   Type "copyright", "credits" or "license" for more information.
   [snip]
   IPython 0.7.2 -- An enhanced Interactive Python.
   [snip]
   In [1]: plot([1,2,3])
   Out[1]: [<matplotlib.lines.Line2D instance at 0x4f010a8>]

I get interactive plot figures as I'd like.

Any clue why I can't change the header in the expected way?

My next question is this: how can one modify xeamcs's py-shell  
command so that it calls -pylab when ipython is invoked?

Thanks again,

--b




More information about the IPython-user mailing list