Re: Where should I put a preferences file? [message #13506 is a reply to message #13428] |
Sat, 14 November 1998 00:00   |
Martin Schultz
Messages: 515 Registered: August 1997
|
Senior Member |
|
|
J.D. Smith wrote:
> Liam Gumley wrote:
>>
>> I have an IDL application in which it would be useful to store a
>> preferences file for each session. For example, this would allow the
>> application to remember the last 4 data files loaded.
>> [...]
How about looking for the IDL startup file (providing you use an identical
name like idl_startup.pro everywhere -- or you query getenv('IDL_STARTUP'))
and put your preferences file in that same directory. I always dislike
cluttering my $HOME directory with "selfmade" files, and assuming a
hard-wired directory name for any users' IDL applications seems risky, too.
If you wish, you can download file_exist.pro and extract_path.pro from my web
page (see below); the first retrieves the fully qualified path for a file in
a list of directories (just pass !PATH here, so it will automatically be
platform dependent [pun intended]), and the latter cuts out the directory
portion of that full path. But you'll probably have something like this on
your own ...
Regards,
Martin.
--
------------------------------------------------------------ -------
Dr. Martin Schultz
Department for Engineering&Applied Sciences, Harvard University
109 Pierce Hall, 29 Oxford St., Cambridge, MA-02138, USA
phone: (617)-496-8318
fax : (617)-495-4551
e-mail: mgs@io.harvard.edu
Internet-homepage: http://www-as.harvard.edu/people/staff/mgs/idl/
------------------------------------------------------------ -------
|
|
|