Python, get windows special folders for currently logged-in user -
how can windows special folders documents, desktop, etc. python script? need win32 extensions?
it must work on windows 2000 windows 7.
you can pywin32 extensions:
from win32com.shell import shell, shellcon print shell.shgetfolderpath(0, shellcon.csidl_mypictures, none, 0) # prints c:\documents , settings\username\my documents\my pictures # (unicode object)
check shellcon.csidl_xxx
other possible folders.
i think using pywin32 best way. else you'd have use ctypes
access shgetfolderpath
function somehow (other solutions might possible these ones know).
Comments
Post a Comment