|
|
|
|
|
Re: 6.1 vs. previous: runtime changes working directory [message #43287 is a reply to message #43204] |
Fri, 25 March 2005 16:01  |
R.Bauer
Messages: 1424 Registered: November 1998
|
Senior Member |
|
|
Michael Wallace wrote:
>> I tried that already - it gives the same answer.
>>
>> The directory is correct when I'm in "interactive" idl, but NOT for
>> runtime.
>
> Could you wrap your IDL call in a shell script where you also set your
> own environmental variable and use that instead? For example,
>
> $ export CWD=$PWD && idl
> IDL> cwd = getenv('CWD')
>
> -Mike
It's not necessary to make an additional export
pro testme
print,getenv('PWD')
end
IDL> compile,'testme'
IDL> exit
> cd Documents
> idl -rt='../testme.sav'
% Restored file: IDLRTMAIN.
/home/me/Documents
compile is from our library. We have included a history function to show
what's all is in the sav file.
cheers
Reimar
--
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
http://www.fz-juelich.de/icg/icg-i/
============================================================ ======
a IDL library at ForschungsZentrum Juelich
http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_lib_intro. html
|
|
|