Re: Finding the "home" folder [Linux/Windows]

From: Mike C. Fletcher (mcfletch_at_rogers.com)
Date: 11/01/03


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/



Relevant Pages

  • Re: Invisible Windows
    ... MS-MVP Windows Shell/User ... Luca Diana hunted and pecked: ... > minimized and useless in the task bar or maximized and out of reach. ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: singleton application :)
    ... The answer does exist in the FAQs: ... It is in the .NET Core section and not in the Windows Forms section.. ... > "Luca" wrote in message ... >> called at the application's startup, but i dont know what to check:) ...
    (microsoft.public.dotnet.languages.csharp)
  • RE: Slow performance with Windows NT Wks.
    ... "Luca" wrote: ... > I am using terminal server (Windows 2003 server) with several Windows NT ... > Network performance are very poor and clients works slowly while using ...
    (microsoft.public.win2000.termserv.clients)
  • Re: Ia32
    ... Windows only works on Ia32 ... I'm learning asm to write my own os:P ... Luca "Kleidemos" Francesca ...
    (alt.lang.asm)