[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: how to set path?
Thank you. I set path like you. I donot think it's a good method. When I
change directory, I have to change all, especially when I generate a .sav
file and run on another computer.
Sometimes, When I donot set full path, it can work. But sometimes it cannot.
Why?
"Johnny Lin" <deja_jlin@my-deja.com> wrote in message
56528e1a.0105251308.29cfee5f@posting.google.com">news:56528e1a.0105251308.29cfee5f@posting.google.com...
> howdy!
>
> you can append additional directory names to the !Path system variable
> like so:
>
> dir_name1 = '~/prog/idl'
> dir_name2 = '~/arcsym/tools/idl'
>
> !Path = dir_name1 + ':' + !Path
> !Path = dir_name2 + ':' + !Path
>
> the IDL documentation says though that !Path only works for .pro files,
etc.
>
> for data files, i generally prefer specifying a string variable that has
> the entire path in it, and appending it to the filename, like:
>
> pathname = '/users/johnny/datafile'
> filename = 'foo.dat'
> fullname = pathname + '/' + filename
>
> maybe someone else has help on specifying paths for data files.
>
> best,
> -Johnny
>
>
> -------------------------------------------
> Johnny Lin
> CIRES, University of Colorado
> Work Phone: (303) 735-1636
> Web: http://cires.colorado.edu/~johnny/
> -------------------------------------------
>