[IPython-user] emacs: sending ipython flags using ipython.el

John Hunter jdhunter at ace.bsd.uchicago.edu
Mon Aug 23 07:59:58 CDT 2004


I'm using the modified ipython.el and python.el with ipython CVS.  I'm
trying to pass some command line args to ipython so that I can get the
new threading features in my py-shell.  Namely, when I launch ipython
from an xterm with the following flags, I get the new 'pylab'
features, and the matplotlib symbols are imported

    peds-pc311:~> ipython -mpthread -p pylab --nobanner
    1 >>> matplotlib
    Out[1]: <module 'matplotlib' from '/usr/local/lib/python2.3/site-packages/matplotlib/__init__.pyc'>
 

I added the following to my .emacs, defining a new lisp function
'pylab' and trying to pass these options to ipython via py-shell

(require 'python-mode)
(require 'ipython)

(defun pylab nil
  "Lauch ipython with the pylab flags"
  (interactive)
  (py-shell "-mpthread -p pylab --nobanner"))


However, when I type 'M-x pylab', the matplotlib symbols are not
imported, and apparently the other threading changes have not take
effect either.  I'm guessing I'm not passing in the optional args
right.

On an unrelated note, does someone have the right but of emacs pixie
dust so that I can bind up arrow in emacs readlines/ipythons
history-search-backward;  Eg,  

# bring up the last command from history that starts with fr 
>>> frUPARROW   

Thanks!
John Hunter

GNU Emacs 21.2.1 (i686-pc-linux-gnu, X toolkit, Xaw3d scroll bars) of 2002-04-29 on mother.paradise.lost
Mark set




More information about the IPython-user mailing list