Home

Tim Chase wrote:
>> You are assuming the system is not localized, that won't work if you
>> distribute your applications internationally. In my system it is not
>> "Desktop", it is "Escritorio", and I guess it will vary with every
>> locale. Does someone know a way to find out what name does the desktop
>> have?
>
> I believe you need to read the Desktop value from
>
> """
> HKEY_CURRENT_USER\software\microsoft\windows\currentversion\ explorer\shell
> folders
> """
>
> which should (in my understanding) hold the full path of the
> particular folder(s) of interest at that location, including
> across localizations.
>
> -tkc

Ideally, use the shell API exposed by pywin32:

<code>
from win32com.shell import shell, shellcon

desktop = shell.SHGetFolderPath (0, shellcon.CSIDL_DESKTOP, 0, 0)

</code>

For slight convenience:

http://timgolden.me.uk/python/winshell.html

TJG

previous
next

Re: module: zipfile.writestr - line endings issue
Re: Really bizarre linking error!
Re: Where do they tech Python officialy ?
Re: java, c or c++
Check for dict key existence, and modify it in one step.
Fundacja Avalon
Kidprotect
Akogo
Niechciane i Zapomniane
Mam Marzenie