Re: IDL v8 not recognizing bash environment variable [message #75814 is a reply to message #75800] |
Fri, 29 April 2011 20:38   |
Michael Galloy
Messages: 1114 Registered: April 2006
|
Senior Member |
|
|
On 4/28/11 9:22 PM, Barry Lesht wrote:
> On Apr 27, 4:37 pm, Michael Galloy<mgal...@gmail.com> wrote:
>> On 4/27/11 3:14 PM, Barry Lesht wrote:
>>
>>
>>
>>
>>
>>>> Check the value of the SEADAS environment variable with the GETENV
>>>> routine. Everything seems fine for me:
>>
>>>> $ export MIKE=Hello
>>>> $ idl
>>>> IDL Version 8.0.1, Mac OS X (darwin x86_64 m64). (c) 2010, ITT Visual
>>>> Information Solutions
>>>> Installation number: 209577.
>>>> Licensed for use by: Tech-X Corporation
>>
>>>> IDL> print, getenv('MIKE')
>>>> Hello
>>
>>>> Mike
>>>> --www.michaelgalloy.com
>>>> Research Mathematician
>>>> Tech-X Corporation
>>
>>> Thanks, Mike. I think your suggestion narrows down the problem. When
>>> I invoke IDL from a shell session, like you did, I get the following:
>>
>>> bash-3.2$ idl
>>> IDL Version 8.0.1, Mac OS X (darwin x86_64 m64). (c) 2010, ITT Visual
>>> Information Solutions
>>> Installation number: 230343.
>>> Licensed for use by: Computer Sciences Corporation
>>
>>> IDL> PRINT, getenv('SEADAS')
>>> /Volumes/1TBSATDATA/sw/seadas6.2
>>> IDL>
>>
>>> which is correct. However, I was working from within the IDL
>>> development environment (MacOS10.6.7) and this is the result there:
>>
>>> IDL Version 8.0.1, Mac OS X (darwin x86_64 m64). (c) 2010, ITT Visual
>>> Information Solutions
>>> Installation number: 230343.
>>> Licensed for use by: Computer Sciences Corporation
>>
>>> IDL> PRINT, getenv('SEADAS')
>>
>>> IDL>
>>
>>> which isn't correct. I may need to add something (not sure what) to a
>>> start-up script somewhere.
>>
>> You could add a line in your startup file to add this. For example, if
>> you don't already have a startup file, create a file, say
>> my_startup.pro, with something like:
>>
>> setenv, 'SEADAS=/Volumes/1TBSATDATA/sw/seadas6.2'
>>
>> If you don't already have a startup file, then you will need to do:
>>
>> IDL> pref_set, 'IDL_STARTUP', '/path/to/my_startup.pro', /commit
>>
>> This will tell IDL to execute the commands in the startup file every
>> time IDL launches (from either the command line or the Workbench).
>>
>> Mike
>> --www.michaelgalloy.com
>> Modern IDL, A Guide to Learning IDL: modernidl.idldev.com
>> Research Mathematician
>> Tech-X Corporation
>
> Thank you, Mike. Any idea why my original code worked under IDL7 and
> does not under IDL8? I appreciate your help. Barry
I don't use the Workbench, I'm not sure why it wouldn't pick up
environment variables. ITT VIS did change the way the processes for the
Workbench and IDL were managed in IDL 8.0, so maybe that could be
responsible?
Mike
--
Michael Galloy
www.michaelgalloy.com
Modern IDL, A Guide to Learning IDL: http://modernidl.idldev.com
Research Mathematician
Tech-X Corporation
|
|
|