Finding application data after install - a solution?

Tim Golden mail at timgolden.me.uk
Thu Sep 24 07:51:39 EDT 2009


Wolodja Wentland wrote:
>> I think many Windows users would say WTF!? when seeing those
>> directories - and send cordial greetings to you, your parents and
>> your whole family :)
> 
> That is probably true, but Windows has a 'etc' directory
> (c:\windows\system32\drivers\etc) which AFAIK contains the hosts file
> and/or other goodies from *NIX.

True, but it's little known and -- as you show -- buried deep in the
innards. I assume that it's the residue (or a symptom) of the Posix
compatibility layer.

> Is CSIDL_COMMON_APPDATA and environment variable set on all Windows
> flavours? 

Certainly all those which Python currently supports. There are
some small subtleties which have changed between older and
newer versions.

Are there versions that relying on this env var (if it is one)
> will cause havoc and the death of millions of kittens? (ie. is it
> available on all versions)
> 
> Where can I find Information on these "other" standard folders? Sorry,
> but I have not used a Windows machine in ages.

(drops CSIDL_COMMON_APPDATA into Google and...)

http://msdn.microsoft.com/en-us/library/bb762494%28VS.85%29.aspx


>> A directory like c:\usr\share\foo on Windows is as ridiculous as
>> /Documents\ and\ Settings/All\ Users/Application\ Data/foo on any unix
>> like system.
> 
> Agreed! Although I find the *NIX flavour more palatable to my eye ;-)

And they say familiarity breeds contempt! ;)

TJG



More information about the Python-list mailing list