My application caches some data on disk. Because the cache may be large, it should not be stored on a network drive. It should persist between invocations of the application. I have a mechanism for the user to choose a location, but would like the default to be sensible and ‘the right thing’ for the platform.
What is the appropriate location for such a cache? Is there an API for determining the appropriate location? How do I call it from Python?
Have a look here: http://en.wikipedia.org/wiki/Environment_variable#User_management_variables. Anything that’s under the users directory is good. If its for all users, then it should be: %ALLUSERSPROFILE%. If its for a specific user, make sure the permissions are right.
Check out MSDN for more info about other Windows Versions. Environment variables can vary from systems to systems.