Has anyone found a version of pywin32 for python 3.x? The latest available appears to be for 2.6.
Alternatively, how would I "roll my own" windows API calls in Python 3.1?
Has anyone found a version of pywin32 for python 3.x? The latest available appears to be for 2.6.
Alternatively, how would I "roll my own" windows API calls in Python 3.1?
You should be able to do everything with ctypes, if a bit cumbersomely.
Here's an example of getting the "common application data" folder:
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)
Result:
C:\Documents and Settings\All Users\Application Data