[Tutor] where to put configuration files

Magnus Lyckå magnus@thinkware.se
Wed Jun 11 05:41:27 2003


At 00:09 2003-06-11 -0400, Paul Tremblay wrote:
>Thanks. So I can test the platform. If it is unix, get the HOME
>variable. If the HOME variable does not exist (which it should?), don't
>install with an error message.
>
>If the platform is Windows, panic!

:)

Another approach is to test for both HOME and USERPROFILE (it can
be argued which you should check for first) and if neither is found,
exit with an error message requesting that either of these (or
possibly just HOME) needs to be set before you run the program.

I don't know how things work on Mac before MacOS X though, if that's
an issue for you...


--
Magnus Lycka (It's really Lyckå), magnus@thinkware.se
Thinkware AB, Sweden, www.thinkware.se
I code Python ~ The Agile Programming Language