Get Special Folders (ie Desktop location)

Colin Steadman colin.steadman at gmail.com
Tue Nov 30 09:47:33 CET 2004


I'm just starting out writing Python scripts (in PSP), and need to
find the location of Windows special folders such as 'My Documents'
and 'Desktop' so that I can save files in the right place.  Is there
any method I can use in Python to get these?

If I were doing this in VBScript it'd be:

  Dim    WSHShell
  Set    WSHShell = WScript.CreateObject("WScript.Shell")
  msgbox WSHShell.SpecialFolders("Desktop")

TIA,

Colin



More information about the Python-list mailing list