Correctly positioning Windows folders is quite a challenge in Python. According to answers regarding Microsoft development technologies such as this one , they must be obtained using the Vista API of known files . This API is not wrapped in the standard Python library (although there is a problem since 2008 requesting it), but you can use the ctypes module to access it anyway.
Adapting the above answer to use the folder id for downloads shown here , and combining it with your existing Unix code should make the code look like this:
import os if os.name == 'nt': import ctypes from ctypes import windll, wintypes from uuid import UUID
A more complete module for extracting famous folders from Python is available on github .
user4815162342
source share