[Spambayes] A kinder, gentler hammie

Richie Hindle richie@entrian.com
Mon Nov 18 18:01:48 2002


Hi Paul,

> The standard [Windows] environment variables which *can* be used for
> this sort of thing are
> 
> 1. HOMEDRIVE and HOMEPATH - %HOMEDRIVE%%HOMEPATH% is basically the
>    equivalent of Unix's $HOME. But for nearly all cases, these end
>    up being C:\, which to my mind is a bad default.
> 2. USERPROFILE - %USERPROFILE% is a user-specific directory suitable
>    for config information. But by default it's a directory with spaces
>    in the name, which can be awkward for some purposes. It's also hard
>    to navigate to in Windows explorer, which makes files stored there
>    a little "hidden".

Not true on 98:

C:\WIN98>set
PROMPT=$p$g
winbootdir=C:\WIN98
COMSPEC=C:\COMMAND.COM
TMPDIR=c:\win98\temp
TEMP=C:\win98\temp
TMP=c:\win98\temp
HOME=D:\BIN\richie
PATH=[paranoia]
QTDIR=C:\qt
TMAKEPATH=C:\qt\tmake\lib\win32-msvc
windir=C:\WIN98

and the only reason 'HOME' is there is that I manually added it - possibly
for the sake of Cygwin, but certainly for something that your typical
Windows user won't have.

Having said that, I agree with this:

> I think "try a number of pathnames" is a sensible approach.

...but is there a fallback that *always* works?  I'm not sure whether there
is - is argv[0] guaranteed to work, even in frozen / py2exe'd / Installer'd
/ cx_Frozen / Squeezed / etc. applications?

-- 
Richie Hindle
richie@entrian.com




More information about the Spambayes mailing list