Where do you store data files?

Mike C. Fletcher mcfletch at rogers.com
Tue Jan 21 05:21:33 CET 2003


On Windows, you should probably be doing something like this:

from win32com.shell import shell, shellcon
path = shell.SHGetFolderPath( 0, shellcon.CSIDL_PERSONAL, 0, 0 ).encode()

to get "My Documents", or CSIDL_LOCAL_APPDATA if you want the (newer, 
less widely available) "Application Data" folder for the user.

While it's true that Windows boxes are less likely to be "properly" 
managed, programs are encouraged (at least by me ;) ) to use the "user" 
areas (such as My Documents) for storage so that systems administration 
is less of a complete PITA.

HTH,
Mike

logistix wrote:

>I've got a project that generates a simple text-format database and
>will probably generate a few dozen more documents for caching
>purposes.  I'm just trying to decide where I should store them.  I was
>thinking about just creating a subfolder in the module, which is fine
>for Windows but doesn't seem to be the "appropriate" Unix place to
>store it.
>
>Just wondering what other people were doing.
>  
>
_______________________________________
  Mike C. Fletcher
  Designer, VR Plumber, Coder
  http://members.rogers.com/mcfletch/








More information about the Python-list mailing list