Need help with TCP/IP client access from Windows

Mark Hammond MHammond at
Sun Aug 1 01:46:13 CEST 1999

Bill Tutt wrote in message
<4D0A23B3F74DD111ACCD00805F31D8100DB90FF7 at RED-MSG-50>...

>The correct way to go about doing these things is via the SHGetFolderPath
>(Calling SHGetSpecialFolderPath is also ok, but SHGetFolderPath is the
>preferred API entry point.)
>Docs at:
>A description of all of the special folders is at:
>Ok so can I use these in Python yet?
>Unfortunately, not at the moment. If someone screams and yells I'm sure
>or I will write the necessary wrapping code.

Actually Bill, you can - althought it is well hidden.

There is a extension that covers this.  It is part of
the COM extensions as all this cruft is heavily tied to COM - eg, creating
shortcuts, etc etc etc.

>>> from import shell, shellcon
>>> shell.SHGetSpecialFolderPath(0, shellcon.CSIDL_PERSONAL)

SHGetFolderPath/Location arent exposed - I will add them - but as you
mention, the SHGetSpecial versions do work fine.


More information about the Python-list mailing list