2009-06-29 62 views

回答

8

你應該可以用ctypes做一切事情,如果有點麻煩。

這裏是讓 「通用應用程序數據」 文件夾中的一個例子:

from ctypes import windll, wintypes 

_SHGetFolderPath = windll.shell32.SHGetFolderPathW 
path_buf = wintypes.create_unicode_buffer(255) 
csidl = 35 
_SHGetFolderPath(0, csidl, 0, 0, path_buf) 
print(path_buf.value) 

結果:

C:\Documents and Settings\All Users\Application Data 
+0

酷!我也會玩這個遊戲。 – Blorgbeard 2009-06-29 20:49:57