How do I get the OS System Font Directory(Cross-Platform) in python?
Christian Heimes
christian at python.org
Thu Jul 11 21:27:04 EDT 2013
Am 11.07.2013 19:19, schrieb Metallicow:
> @ Chris “Kwpolska” Warrick
> Thanks, that is a start anyway.
> a Pure-Python way was what I was wanting, not win32api stuff.
>
> "C:\Windows\Fonts"
> The windows path proves valid. Works on XP, Vista, 7. Not sure about win8....?
That's the wrong way to do it. You have to use the proper Windows API to
get to the font directory. It's SHGetKnownFolderPath() with
FOLDERID_Font or SHGetFolderPath() with CSIDL_FONTS.
See http://bugs.python.org/issue1763
Christian
More information about the Python-list
mailing list