Re: IDL v8 not recognizing bash environment variable [message #75798] |
Tue, 03 May 2011 08:26 |
R.Bauer
Messages: 1424 Registered: November 1998
|
Senior Member |
|
|
Am 03.05.2011 15:11, schrieb Craig Markwardt:
> On May 3, 6:20 am, Reimar Bauer <R.Ba...@fz-juelich.de> wrote:
>> Am 27.04.2011 19:57, schrieb Barry Lesht:
>>
>>> Not sure I'm expressing this correctly in the subject line - this is
>>> my problem: I have a code that ran fine under IDL7 that included the
>>> line "sta_list = READ_ASCII("$SEADAS/local/stationfile.txt,"
>>> TEMPLATE=stationtemplate). I just tried running the same code under
>>> IDL8 and now get the error message
>>
>> I tried with idl7.1
>>
>> IDL> print,"$HOME"
>>
>> and it just tells:
>> $HOME
>>
>> I don't remember that it ever worked without using getenv function.
>
> Careful. You tested the PRINT command, and I agree that "it" never
> automatically retrieved environment variables.
>
> On the other hand, OPEN has always expanded shell variables, for as
> long as I have known. And my experience is that shell variable
> expansion by OPEN still works within IDL 8.1.
>
> Craig
>
>
Oh yes, that works!
Reimar
>
>>
>>> % READ_ASCII: File "$SEADAS/local/stationfile.txt" not found.
>>
>>> The file is most definitely where it should be. After doing some
>>> experimenting, it seems IDL8 isn't getting any value for the $SEADAS
>>> variable.
>>
>>> I hope someone can explain to me why not and how to fix it?
>>
>>> Thanks.
>
|
|
|
Re: IDL v8 not recognizing bash environment variable [message #75799 is a reply to message #75798] |
Tue, 03 May 2011 06:11  |
Craig Markwardt
Messages: 1869 Registered: November 1996
|
Senior Member |
|
|
On May 3, 6:20 am, Reimar Bauer <R.Ba...@fz-juelich.de> wrote:
> Am 27.04.2011 19:57, schrieb Barry Lesht:
>
>> Not sure I'm expressing this correctly in the subject line - this is
>> my problem: I have a code that ran fine under IDL7 that included the
>> line "sta_list = READ_ASCII("$SEADAS/local/stationfile.txt,"
>> TEMPLATE=stationtemplate). I just tried running the same code under
>> IDL8 and now get the error message
>
> I tried with idl7.1
>
> IDL> print,"$HOME"
>
> and it just tells:
> $HOME
>
> I don't remember that it ever worked without using getenv function.
Careful. You tested the PRINT command, and I agree that "it" never
automatically retrieved environment variables.
On the other hand, OPEN has always expanded shell variables, for as
long as I have known. And my experience is that shell variable
expansion by OPEN still works within IDL 8.1.
Craig
>
>> % READ_ASCII: File "$SEADAS/local/stationfile.txt" not found.
>
>> The file is most definitely where it should be. After doing some
>> experimenting, it seems IDL8 isn't getting any value for the $SEADAS
>> variable.
>
>> I hope someone can explain to me why not and how to fix it?
>
>> Thanks.
|
|
|
Re: IDL v8 not recognizing bash environment variable [message #75800 is a reply to message #75799] |
Tue, 03 May 2011 03:20  |
R.Bauer
Messages: 1424 Registered: November 1998
|
Senior Member |
|
|
Am 27.04.2011 19:57, schrieb Barry Lesht:
> Not sure I'm expressing this correctly in the subject line - this is
> my problem: I have a code that ran fine under IDL7 that included the
> line "sta_list = READ_ASCII("$SEADAS/local/stationfile.txt,"
> TEMPLATE=stationtemplate). I just tried running the same code under
> IDL8 and now get the error message
I tried with idl7.1
IDL> print,"$HOME"
and it just tells:
$HOME
I don't remember that it ever worked without using getenv function.
Reimar
>
> % READ_ASCII: File "$SEADAS/local/stationfile.txt" not found.
>
> The file is most definitely where it should be. After doing some
> experimenting, it seems IDL8 isn't getting any value for the $SEADAS
> variable.
>
> I hope someone can explain to me why not and how to fix it?
>
> Thanks.
|
|
|
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
|
|
|
Re: IDL v8 not recognizing bash environment variable [message #75823 is a reply to message #75814] |
Thu, 28 April 2011 20:22  |
BLesht
Messages: 89 Registered: March 2007
|
Member |
|
|
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
|
|
|
Re: IDL v8 not recognizing bash environment variable [message #75837 is a reply to message #75823] |
Wed, 27 April 2011 14:37  |
Michael Galloy
Messages: 1114 Registered: April 2006
|
Senior Member |
|
|
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
|
|
|
Re: IDL v8 not recognizing bash environment variable [message #75838 is a reply to message #75837] |
Wed, 27 April 2011 14:34  |
Michael Galloy
Messages: 1114 Registered: April 2006
|
Senior Member |
|
|
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
|
|
|
Re: IDL v8 not recognizing bash environment variable [message #75839 is a reply to message #75838] |
Wed, 27 April 2011 14:14  |
BLesht
Messages: 89 Registered: March 2007
|
Member |
|
|
> 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.
Barry
|
|
|
Re: IDL v8 not recognizing bash environment variable [message #75840 is a reply to message #75839] |
Wed, 27 April 2011 13:02  |
Michael Galloy
Messages: 1114 Registered: April 2006
|
Senior Member |
|
|
On 4/27/11 11:57 AM, Barry Lesht wrote:
> Not sure I'm expressing this correctly in the subject line - this is
> my problem: I have a code that ran fine under IDL7 that included the
> line "sta_list = READ_ASCII("$SEADAS/local/stationfile.txt,"
> TEMPLATE=stationtemplate). I just tried running the same code under
> IDL8 and now get the error message
>
> % READ_ASCII: File "$SEADAS/local/stationfile.txt" not found.
>
> The file is most definitely where it should be. After doing some
> experimenting, it seems IDL8 isn't getting any value for the $SEADAS
> variable.
>
> I hope someone can explain to me why not and how to fix it?
>
> Thanks.
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
|
|
|