shell.SHGetFolderPath

string/PyUnicode = SHGetFolderPath(hwndOwner, nFolder , handle , flags )

Retrieves the path of a folder.

Parameters

hwndOwner : PyHANDLE

Parent window, can be None (or 0)

nFolder : int

One of the CSIDL_* constants specifying the path.

handle : PyHANDLE

An access token that can be used to represent a particular user, or None

flags : int

Controls which path is returned. May be SHGFP_TYPE_CURRENT or SHGFP_TYPE_DEFAULT

Comments

This method is only available with later versions of shell32.dll, or if you have shfolder.dll installed on earlier systems