Finding the "home" folder [Linux/Windows]
Mike C. Fletcher
mcfletch at rogers.com
Sat Nov 1 17:06:39 EST 2003
There's some code in OpenGLContext to do something like this (though
it's getting the user's application-data directory, not their "home"
directory):
http://cvs.sourceforge.net/viewcvs.py/pyopengl/OpenGLContext/browser/homedirectory.py?view=markup
You'll want to use one of the other shellcon.CSIDL_* constants and
something other than 'AppData' to get the "home" directory (whatever
that means) and will want to figure out something for Win9x. On Windows
AFAIK there really isn't a home directory concept, BTW, you're supposed
to store different types of things in different directories.
HTH,
Mike
Luca T. wrote:
>Hello,
>i need a way to find the home folder of the current user no matter if i am
>in Linux or Windows for instance:
>* Linux: /home/username
>* Windows: C:\Documents and Settings\username
>
>[of course this might change]
>
>Is there any general way to do this?
>
>Thank you,
> Luca
>
>
_______________________________________
Mike C. Fletcher
Designer, VR Plumber, Coder
http://members.rogers.com/mcfletch/
More information about the Python-list
mailing list