comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » IDL hates python?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
IDL hates python? [message #76686] Thu, 23 June 2011 05:05 Go to previous message
Gray is currently offline  Gray
Messages: 253
Registered: February 2010
Senior Member
Hi all,

As part of my very long and complicated IDL program (running in IDL
8.0.1), I use SPAWN to call a package (that I didn't write) which
involves some Python routines; example code, very stripped down:

for i=0,ndir-1 do begin
cd, dirs[i]
spawn, 'my_call_on_file_1'
spawn, 'my_call_on_file_2'
spawn, 'my_call_on_file_3'
do_a_bunch_of_other_stuff
cd, '..'
endfor


When I try to run my program from the IDLDE, I get an error from
stderr saying that the package couldn't find Python. When I run from
the IDL command line, it works fine the first pass through loop;
however, as soon as the loop iterates IDL loses track of Python
again. The upshot is that I can't automate my program to run over a
number of directories, I have to call it individually for each
directory, which is INCREDIBLY annoying and very inefficient. Here is
the error:

env: python: No such file or directory
augment-xylist.c:585:backtick: Failed to run command: /usr/local/
astrometry/bin/removelines.py CONT1.xyls /tmp/tmp.removelines.j0DItP

IDL knows where Python is, since it works fine on the first pass
through the loop (at least, when I call from the command line instead
of the DE, which I don't mind doing). However, on subsequent
iterations it fails. Is it just IDL trying to discourage Python use?
What's going on here?

Thanks to everyone for your help, as always.

--Gray
[Message index]
 
Read Message
Read Message
Previous Topic: dezimal point
Next Topic: idl8.1 escape from debug view

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 15:39:21 PDT 2025

Total time taken to generate the page: 0.00367 seconds