windows - Find system folder locations in Python -


i trying find out location of system folders python 3.1. example "my documents" = "c:\documents , settings\user\my documents", "program files" = "c:\program files" etc etc.

i found a different way of doing it. way give location of various system folders , uses real words instead of clsids.

import win32com.client objshell = win32com.client.dispatch("wscript.shell") alluserdocs = objshell.specialfolders("allusersdesktop") print alluserdocs 

other available folders: allusersdesktop, allusersstartmenu, allusersprograms, allusersstartup, desktop, favorites, fonts, mydocuments, nethood, printhood, recent, sendto, startmenu, startup & templates


Comments

Popular posts from this blog

List<T>().Add problem C# -

Javascript natural sort array/object and maintain index association -