X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 13 May 2019 10:52 AM by  Ben Castellani
Python to IDL bridge: unable to call IDL.pro function
 1 Replies
Sort:
You are not authorized to post a reply.
Author Messages

Vanessa Lowry



New Member


Posts:
New Member


--
10 May 2019 12:42 PM
    I am trying to call a function file "el2xv.pro" which I have in my working directory. I tried both ways below with no luck. Please help.

    >>> from idlpy import *
    >>> IDL.el2xv(Mcen, a, E, I, O, w, M)
    % Attempt to call undefined function: 'EL2XV'.
    % Execution halted at: $MAIN$
    Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    File "/usr/local/harris/idl87/lib/bridges/idlpy.py", line 288, in __call__
    if err: raise IDLError(output)
    idlpy.IDLError: % Attempt to call undefined function: 'EL2XV'.


    >>> import el2xv
    >>> el2xv(Mcen, a, E, I, O, w, M)
    Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    TypeError: 'module' object is not callable

    Ben Castellani



    Basic Member


    Posts:130
    Basic Member


    --
    13 May 2019 10:52 AM
    Just to confirm, are you using the Python-->IDL bridge?

    In any case, your custom IDL routine needs to be in the IDL search path to be found and executed when called from Python. You can verify your search path using the following command:

    IDL.run("print,!path")

    Does that output include the directory containing your custom PRO file?
    You are not authorized to post a reply.