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
>
> You can do that in Python using the pywin32 extensions
> either by using the Wshell objects as you have done:
>
>
>
> import win32com.client
> WShell = win32com.client.Dispatch ("WScript.Shell")
> WShell.SpecialFolders ("Desktop")
>
>
>
> or by using the shell module from the same packag