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

unicode - Are email addresses allowed to contain non-alphanumeric characters? -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

c++ - Convert big endian to little endian when reading from a binary file -