Re: vm cwd in *nix [message #54747 is a reply to message #54735] |
Thu, 05 July 2007 06:30   |
Vince Hradil
Messages: 574 Registered: December 1999
|
Senior Member |
|
|
On Jul 3, 6:33 pm, "mgal...@gmail.com" <mgal...@gmail.com> wrote:
> On Jul 3, 4:50 pm, rcl...@hindmost.lpl.arizona.edu (Richard Clark)
> wrote:
>
>> I'm developing a tool for use in an application (and on workstation)
>> that doesn't otherwise use idl so I'm hoping to run it in the idl
>> virtual machine.
>
>> Running it in normal fully interactive idl it works fine but not in
>> vm. I figured out that this is because the vm comes up in the location
>> of the .sav file as its current working directory.
>
>> Is there an easy way to notify the vm application of the location it
>> is being started from without the user having to type in
>> big_long_convoluted_path_name at some point?
>
> Do you mean start with a given current directory or just to know what
> directory it is started from?
>
> If you just want to know where you are starting from, everyone seems
> to have their own version, mine is:
>
> http://michaelgalloy.com/wp-content/uploads/2007/07/mg_src_r oot.pro
>
> Called from a routine, it will return the directory of the .pro
> or .sav file where that routine was located.
>
> If you want to start in a given directory, just use CD (the IDL
> routine).
>
>> And a related question...
>
>> Is there a way to automatically generate a mouse click to get past the
>> vm startup screen? (again, this is all linux/unix so a non portable
>> solution is ok)
>> The application mentioned above is semi-interactive and a human is in
>> the loop, but we have a couple of fully automated processing pipelines
>> (multiple, independent instances may be running, each at its own rate)
>> where we would like to use idl but also need to keep costs under
>> control.
>
> I believe the answer to that is to buy a runtime license.
>
>> Has anyone ever translated their documentation about licensing into
>> english?
>
> No.
>
> Mike
> --www.michaelgalloy.com
I'll agree (mostly) with Mike. The splash screen is there for a
reason...
However, I think you missed the point Mike on the 'cwd' question. I
too have run into this problem - with IDL changing directory to the
directory where the .sav file is. For instance. Say the user want to
start a .sav file to operate on some files in /da/mr/data/. He first
does, > cd /da/mr/data then runs the program. But the program (the
sav file) is in /usr/local/savfiles, so when the sav file tries to
open foo.dat it can't find it.
To circumvent this, I usually wrap the thing in a (bash) shell
script. I capture $PWD and export the variable, then call idl -vm=/
usr/local/savfiles/foo.sav
If anyone from ITT/IDL is out there listening... this used to not be a
problem, until about v6.0 or maybe 6.1. Before that IDL would not
have the current working directory as the directory from which idl was
started. I for one liked it better that way. Maybe it's a limitation
of the vm?
|
|
|