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

Home » Public Forums » archive » Which "PATH" did IDL use???
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Which "PATH" did IDL use??? [message #91550] Wed, 29 July 2015 02:33 Go to next message
deepeyes.ym is currently offline  deepeyes.ym
Messages: 4
Registered: July 2015
Junior Member
I'm really confused about all the parameters inside of IDL.
I have called "spawn" by using

IDL> spawn, 'gv m4_r_600_test_flag0_individual_outliers.eps'
bash: gv: command not found

Then,

IDL> PRINT,GETENV("PATH")
/Applications/itt/idl71//bin:/usr/bin:/bin:/usr/sbin:/sbin

BUT, I don't know where this "PATH" comes from!!!!

It's different from the "!PATH" inside of IDL, different from the "$PATH" in the .bash_profile, so where IDL get this parameter and how could I change this one????

any comments will be appreciated!
Re: Which "PATH" did IDL use??? [message #91551 is a reply to message #91550] Wed, 29 July 2015 03:03 Go to previous messageGo to next message
Heinz Stege is currently offline  Heinz Stege
Messages: 189
Registered: January 2003
Senior Member
Please look for
CD [, Directory] [, CURRENT=variable]
in the IDL Help.

Cheers, Heinz
Re: Which "PATH" did IDL use??? [message #91561 is a reply to message #91550] Wed, 29 July 2015 13:49 Go to previous messageGo to next message
Doug Edmundson is currently offline  Doug Edmundson
Messages: 58
Registered: November 2005
Member
On 7/29/15 3:33 AM, deepeyes.ym@gmail.com wrote:
> I'm really confused about all the parameters inside of IDL.
> I have called "spawn" by using
>
> IDL> spawn, 'gv m4_r_600_test_flag0_individual_outliers.eps'
> bash: gv: command not found
>
> Then,
>
> IDL> PRINT,GETENV("PATH")
> /Applications/itt/idl71//bin:/usr/bin:/bin:/usr/sbin:/sbin
>
> BUT, I don't know where this "PATH" comes from!!!!
>
> It's different from the "!PATH" inside of IDL, different from the "$PATH"
in the .bash_profile, so where IDL get this parameter and how could I change
this one????
>
> any comments will be appreciated!
>

Hi deepeyes,

I'll guess that in your case it's using .bashrc to set the environment.
It will not be using IDL's environment since a new "bash" shell is
being created. So, try updating PATH in .bashrc.

Cheers,
Doug
Re: Which "PATH" did IDL use??? [message #91568 is a reply to message #91551] Thu, 30 July 2015 02:07 Go to previous messageGo to next message
deepeyes.ym is currently offline  deepeyes.ym
Messages: 4
Registered: July 2015
Junior Member
On Wednesday, July 29, 2015 at 1:02:58 PM UTC+3, Heinz Stege wrote:
> Please look for
> CD [, Directory] [, CURRENT=variable]
> in the IDL Help.
>
> Cheers, Heinz

Sorry, I don't get the point..
Re: Which "PATH" did IDL use??? [message #91569 is a reply to message #91561] Thu, 30 July 2015 02:09 Go to previous messageGo to next message
deepeyes.ym is currently offline  deepeyes.ym
Messages: 4
Registered: July 2015
Junior Member
On Wednesday, July 29, 2015 at 11:49:56 PM UTC+3, Doug Edmundson wrote:
> On 7/29/15 3:33 AM, wrote:
>> I'm really confused about all the parameters inside of IDL.
>> I have called "spawn" by using
>>
>> IDL> spawn, 'gv m4_r_600_test_flag0_individual_outliers.eps'
>> bash: gv: command not found
>>
>> Then,
>>
>> IDL> PRINT,GETENV("PATH")
>> /Applications/itt/idl71//bin:/usr/bin:/bin:/usr/sbin:/sbin
>>
>> BUT, I don't know where this "PATH" comes from!!!!
>>
>> It's different from the "!PATH" inside of IDL, different from the "$PATH"
> in the .bash_profile, so where IDL get this parameter and how could I change
> this one????
>>
>> any comments will be appreciated!
>>
>
> Hi deepeyes,
>
> I'll guess that in your case it's using .bashrc to set the environment.
> It will not be using IDL's environment since a new "bash" shell is
> being created. So, try updating PATH in .bashrc.
>
> Cheers,
> Doug

Actually, I'm using IDLDE, that's why the .bash_profile not working (I have already defined the PATH in .bash_profile)
Re: Which "PATH" did IDL use??? [message #91576 is a reply to message #91568] Thu, 30 July 2015 09:46 Go to previous messageGo to next message
Heinz Stege is currently offline  Heinz Stege
Messages: 189
Registered: January 2003
Senior Member
On Thu, 30 Jul 2015 02:07:01 -0700 (PDT), deepeyes.ym@gmail.com wrote:

> On Wednesday, July 29, 2015 at 1:02:58 PM UTC+3, Heinz Stege wrote:
>> Please look for
>> CD [, Directory] [, CURRENT=variable]
>> in the IDL Help.
>>
>> Cheers, Heinz
>
> Sorry, I don't get the point..

Well, seems like I didn't get your question too. I read your original
message two more times to get an idea. I'm not very familar with
Unix/Linux, so probably I will not be able to help. But I will try:

The IDL command
spawn, 'gv m4_r_600_test_flag0_individual_outliers.eps'
obviously failed, because the bash shell does not find the command
"gv". IDL does not know in which folder gv resides. IDL simply sends
the spawn command to the shell. If you know the path of the file gv,
add it to the spawn command:
spawn, 'path/gv m4_r_600_test_flag0_individual_outliers.eps'
and everything should be fine.

If there is any reason, not to specify the path, you can try xdg-open.
It may or may not work:

spawn,['xdg-open','m4_r_600_test_flag0_individual_outliers.e ps'],/noshell
This worked for me in case of an .ods file, when I exported an IDL
program from Windows to Linux.

Cheers, Heinz
Re: Which "PATH" did IDL use??? [message #91577 is a reply to message #91550] Thu, 30 July 2015 11:42 Go to previous messageGo to next message
zacharyanorman is currently offline  zacharyanorman
Messages: 17
Registered: July 2015
Junior Member
When you start IDL, the only change that IDL makes to the path variable is to make IDL's bin and necessary directories be set at the beginning of $PATH so that they are searched first. Before pointing fingers at IDL, it may be best to rule out that you have your path environment set up correctly outside of IDL. in other words, can you run your command 'gv m4_r_600_test_flag0_individual_outliers.eps' just fine when in a terminal window? Once you confirm that it works when you are outside of IDL, then launch IDL from the same terminal window and see if you still get an error.

If all else fails, you can always use SETENV (http://www.exelisvis.com/docs/SETENV.html) to change your path if you don't want to in the Terminal.
Re: Which "PATH" did IDL use??? [message #91578 is a reply to message #91550] Thu, 30 July 2015 12:24 Go to previous message
deepeyes.ym is currently offline  deepeyes.ym
Messages: 4
Registered: July 2015
Junior Member
On Wednesday, July 29, 2015 at 12:33:32 PM UTC+3, deepe...@gmail.com wrote:
> I'm really confused about all the parameters inside of IDL.
> I have called "spawn" by using
>
> IDL> spawn, 'gv m4_r_600_test_flag0_individual_outliers.eps'
> bash: gv: command not found
>
> Then,
>
> IDL> PRINT,GETENV("PATH")
> /Applications/itt/idl71//bin:/usr/bin:/bin:/usr/sbin:/sbin
>
> BUT, I don't know where this "PATH" comes from!!!!
>
> It's different from the "!PATH" inside of IDL, different from the "$PATH" in the .bash_profile, so where IDL get this parameter and how could I change this one????
>
> any comments will be appreciated!

Dear all,
thank you very much for all your help. With suggestion from Doug, I finally be able to solve this problem. First of all, I'm sorry that I forget to mention I'm using Mac OSX 10.11 public beta 3 and IDL v7.1.1. This problem not appears in 10.10.4. So, may be Apple changes something. The solution is that just COPY .bash_profile to .bashrc, since OSX don't have the .bashrc in the first place (also I have already set the $PATH in .bash_profile, that's why it is ok when using idl in terminal). It's seems that IDLDE v7 only recognizes the .bashrc.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Dynamically naming structures in IDL
Next Topic: Help Doing HDF(-EOS) to Multi-layer GeoTIFF Conversion with IDL

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

Current Time: Wed Oct 08 09:15:48 PDT 2025

Total time taken to generate the page: 0.00603 seconds