Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=python.org; s=200901; t=1373592434; bh=PkxL6tzfQx7OGKCAR6+xONBUXKLeVXYcDPOnoG+q57o=; h=To:From:Subject:Date:Message-ID:References:Mime-Version: Content-Type:Content-Transfer-Encoding:In-Reply-To; b=EoxIh+F/48Ut0FzNHlmz7oRijn9mK1Gskp6jypcpSQHnIs/Kq87fCGBm5Ihl5IfdW Gu71s+VMDHgaA0IXKGgPkn4TpXcTwNg4pAx40upM1s4QyRHdQeRyorssIvo+cStNp7 mzygXF/nKsZF9J0nf8LBkABm7WghRdrGCbBZyS0g= X-Spam-Status: OK 0.004 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'anyway.': 0.05; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subject:How': 0.10; 'api': 0.11; 'windows': 0.15; 'from:name:christian heimes': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'stuff.': 0.16; 'subject: \n ': 0.16; 'valid.': 0.16; 'subject:python': 0.16; 'from:addr:python.org': 0.16; 'thanks,': 0.17; 'header:User-Agent:1': 0.23; 'directory.': 0.24; 'header:X -Complaints-To:1': 0.27; 'header:In-Reply-To:1': 0.27; 'chris': 0.29; 'url:bugs': 0.29; 'subject:) ': 0.29; 'font': 0.31; 'url:python': 0.33; 'subject:the': 0.34; 'subject:?': 0.36; 'url:org': 0.36; 'wrong': 0.37; 'christian': 0.38; 'to:addr :python-list': 0.38; 'sure': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'charset:windows-1252': 0.65; 'subject:get': 0.81; 'proves': 0.84; 'subject:Platform': 0.84; 'vista,': 0.84 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Christian Heimes Subject: Re: How do I get the OS System Font Directory(Cross-Platform) in python? Date: Fri, 12 Jul 2013 03:27:04 +0200 References: <3d97de86-f690-40ad-aba8-972120af7ff3@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-Gmane-NNTP-Posting-Host: f048012255.adsl.alicedsl.de User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130510 Thunderbird/17.0.6 In-Reply-To: X-Enigmail-Version: 1.4.6 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 16 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1373592436 news.xs4all.nl 15889 [2001:888:2000:d::a6]:37162 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:50482 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