[IPython-dev] Strange bug
Thu Mar 22 01:42:21 CDT 2007
On 1/5/07, Gregory Novak <email@example.com> wrote:
> I just spent the better part of a day trying to figure out what on
> earth was going on with a rather strange bug. The dramatis personae:
> pyIDL is a bit of python + c code that allows you call IDL
> (http://www.ittvis.com/idl/) code from Python
> (for Mike: IPython is an enhanced interactive python shell
> pyIDL provides getattr/setattr functions to access variables in IDL so
> that instead of typing idl_instance.get('x') you can type
> There's also a function called eval that evaluates IDL expressions,
> like so:
> When I called idl_instance.eval('y=x') under plain vanilla python, it
> worked fine. When I called the same thing under IPython, I got
> strange errors coming from IDL:
> % Attempt to call undefined procedure/function: 'EVAL'.
> % Execution halted at: $MAIN$
I just wanted to update you on this. I'm pretty sure that recent work
on the input parsinng code, with contributions from Dan Milstein and
Alex Schmolck, have squashed this particular bug (Alex got hit
basically by the same problem, and in an oddly similar system: his
matlab call system which is much like your IDL one but for matlab).
Here's a simple demo:
In : !cat attribs.py
print 'getattr: ', attr; return lambda *args, **kwargs: 'nada'
In : run attribs.py
In : f.eval('y=x')
So I think that with current SVN, or ipython 0.7.4 (due in a couple of
weeks) you should be good. It would be nice if you could double check
with an SVN checkout and let us know of any problems before we put
0.7.4 officially out.
More information about the IPython-dev