Re: Finding the "home" folder [Linux/Windows]
From: Mike C. Fletcher (mcfletch_at_rogers.com)
Date: 11/01/03
- Next message: Jay Dorsey: "Re: what is this?"
- Previous message: Irmen de Jong: "Re: Removing Unicode from Python?"
- In reply to: Luca T.: "Finding the "home" folder [Linux/Windows]"
- Next in thread: Trent Mick: "Re: Finding the "home" folder [Linux/Windows]"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 01 Nov 2003 17:06:39 -0500 To: python-list@python.org
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/
- Next message: Jay Dorsey: "Re: what is this?"
- Previous message: Irmen de Jong: "Re: Removing Unicode from Python?"
- In reply to: Luca T.: "Finding the "home" folder [Linux/Windows]"
- Next in thread: Trent Mick: "Re: Finding the "home" folder [Linux/Windows]"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|