0
더 속성 'create_unicode_buffer'가 없습니다 :AttributeError는 : 모듈 'ctypes.wintypes는'이것은 내 코드의 일부이다
import os
def _get_appdata_path():
import ctypes
from ctypes import wintypes, windll
CSIDL_APPDATA = 26
_SHGetFolderPath = windll.shell32.SHGetFolderPathW
_SHGetFolderPath.argtypes = [wintypes.HWND,
ctypes.c_int,
wintypes.HANDLE,
wintypes.DWORD,
wintypes.LPCWSTR]
path_buf = wintypes.create_unicode_buffer(wintypes.MAX_PATH)
result = _SHGetFolderPath(0, CSIDL_APPDATA, 0, 0, path_buf)
return path_buf.value
을하지만 wintypes.create_unicode_buffer()
를 호출 할 때 나는 오류 얻을 :
AttributeError: module 'ctypes.wintypes' has no attribute 'create_unicode_buffer'
I을 Python 3.5.1을 사용하고 있습니다. 내가 뭘 할 수 있니?
http://stackoverflow.com/questions/626796/how-do-i-find-the-windows-common-application-data-folder-using-python#comment33587651_626927 – gplayer