[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: IDL and UNIX setenv



Daniel Peduzzi wrote:
> 
> I have an executable (compiled from C) which I'd like to
> run from within IDL using SPAWN.  However, I'd like to refer
> to the executable without prepending a pathname:
> 
> IDL> spawn, "myprog", result
> 
> instead of
> 
> IDL>spawn,"/usr1/guest/bin/myprog", result
> 
> I tried to append the "/usr1/guest/bin/" directory to my UNIX
> path before starting an IDL session, but the path information
> doesn't seem to be propagated into IDL.
> 
> What else, if anything, can I do to get IDL to find "myprog"?

I think you might need to add the path to your default .profile/.login/.cshrc/.whatever
(which I am assuming you're not doing - I really can't tell from "I tried to append the
/usr1/guest/bin/ directory to my UNIX path before starting an IDL session")

I *think* when you use SPAWN, the subsequent shell in which the SPAWN command argument is
executed is *not* the one you started IDL in and therefore has no knowledge of what you
may have explicitly defined. The same sort of thing happens in make files in Unix. 

paulv

-- 
Paul van Delst           A little learning is a dangerous thing;
CIMSS @ NOAA/NCEP        Drink deep, or taste not the Pierian spring;
Ph: (301)763-8000 x7274  There shallow draughts intoxicate the brain,
Fax:(301)763-8545        And drinking largely sobers us again.
                                         Alexander Pope.