[IPython-dev] minor ipython.el news

Fernando Perez Fernando.Perez at colorado.edu
Wed May 5 17:13:43 CDT 2004

Hi Alexander,

> I have however recently discovered in an email exchange with a ipytho/emacs
> user that the version of ipython.el in ipython-emacs.tgz is older than the one
> I use myself (I've made some slight improvements to the traceback regexp and
> added some dirtrack stuff, which might actually be redundant).
> Anyway, here is the newest version:

Ok, thanks for this.  I just uploaded into:


a tarball with the currently official python-mode from sourceforge and the 
ipython.el file you sent as well.

> BTW, I think it would be nice if ipython's traceback output would be a bit
> more uniform, i.e. always match this (or some other emacs-regexp) pattern:
>  \(^[^\t ].+?\.py\).*\n   +[0-9]+[^\00]*?\n-+> \([0-9]+\) +
> Syntax errors for example currently produce output that doesn't match the
> abovee, so it's not possible to automatically jump to the right line in the
> source code (and emacs regexp limitations + the way traceback parsing is
> hardcoded in python-mode.el make it impossible to handle them seperately).

Hmm.  I poked around ultraTB.py, which is the traceback formatting code, and 
it looks doable.  However, not particularly straightforward at first sight :( 
  That code is rather convoluted, and I'm not super-familiar with it, since I 
didn't originally write it myself (though I've modified it quite a bit).  So 
don't hold your breath on this one.  However, if in your copious spare time 
you come up with a nice patch for it, I'll gladly include it in ;-)

> P.S: There has been some effort in supplying shell like functionality to
> ipython of late (not a bad idea in principle, I think, the fact that python
> doesn't have syntax extension facilities is severely limiting here) -- one
> thing that really often annoys me is the behavior of @run (which not only does
> not perform any shell like globbing, but also doesn't seem to allow actually
> passing parameters with spaces in them since there is no quoting or escaping
> mechanism as far as I'm aware). Are there any plans to add globbing and
> quoting or is there already an easy way to get the equivalent of
>>./script.py --title 'some title'

This one looks more feasible: it's basically adding more sophisticated quoting 
to @run than the simple .split() it currently does (I mean for the quoting, 
globbing is even easier).  I'll see if I can get this one in soonish, to at 
least grant you one of your wishes :)

I hope your health improves.



More information about the IPython-dev mailing list