Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #50496
| References | <3d97de86-f690-40ad-aba8-972120af7ff3@googlegroups.com> <dcca3b88-52fb-474f-8cce-4829149fcfaf@googlegroups.com> <mailman.4607.1373592436.3114.python-list@python.org> <9218c1f3-f107-4942-90d6-26c017f1e4e7@googlegroups.com> |
|---|---|
| Date | 2013-07-12 14:58 +1000 |
| Subject | Re: How do I get the OS System Font Directory(Cross-Platform) in python? |
| From | Chris Angelico <rosuav@gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.4613.1373605132.3114.python-list@python.org> (permalink) |
On Fri, Jul 12, 2013 at 2:24 PM, Metallicow <metaliobovinus@gmail.com> wrote: > On Thursday, July 11, 2013 8:27:04 PM UTC-5, Christian Heimes wrote: >> 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 > > typo'd instead of copy/pasted. What I meant was... Chris's code... > >>>> FONTDIRS = os.path.join(os.environ['WINDIR'], 'Fonts') > 'C:\\WINDOWS\\Fonts' > > returned valid as returned string. Forgot to add >>> part. > Is there any way to edit posts? Don't see an edit linky anywhere. > Is there something wrong with using os.environ...? > win32api stuff is another dependency. Is it really needed? No, you fundamentally cannot edit posts. This is a Usenet newsgroup and a mailing list; once your post is sent, it gets carried by lots of different servers separately. Just send a followup, same as you did there. Since you seem to be using Google Groups, please read this to learn how to avoid antagonizing a significant proportion of the list's best responders: http://wiki.python.org/moin/GoogleGroupsPython ChrisA
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
How do I get the OS System Font Directory(Cross-Platform) in python? Metallicow <metaliobovinus@gmail.com> - 2013-07-11 08:32 -0700
Re: How do I get the OS System Font Directory(Cross-Platform) in python? Chris “Kwpolska” Warrick <kwpolska@gmail.com> - 2013-07-11 17:48 +0200
Re: How do I get the OS System Font Directory(Cross-Platform) in python? Metallicow <metaliobovinus@gmail.com> - 2013-07-11 08:54 -0700
Re: How do I get the OS System Font Directory(Cross-Platform) in python? Chris “Kwpolska” Warrick <kwpolska@gmail.com> - 2013-07-11 18:12 +0200
Re: How do I get the OS System Font Directory(Cross-Platform) in python? Metallicow <metaliobovinus@gmail.com> - 2013-07-11 10:19 -0700
Re: How do I get the OS System Font Directory(Cross-Platform) in python? Christian Heimes <christian@python.org> - 2013-07-12 03:27 +0200
Re: How do I get the OS System Font Directory(Cross-Platform) in python? Metallicow <metaliobovinus@gmail.com> - 2013-07-11 21:24 -0700
Re: How do I get the OS System Font Directory(Cross-Platform) in python? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-07-12 04:55 +0000
Re: How do I get the OS System Font Directory(Cross-Platform) in python? Chris Angelico <rosuav@gmail.com> - 2013-07-12 14:58 +1000
Re: How do I get the OS System Font Directory(Cross-Platform) in python? Nobody <nobody@nowhere.com> - 2013-07-11 18:47 +0100
Re: How do I get the OS System Font Directory(Cross-Platform) in python? Metallicow <metaliobovinus@gmail.com> - 2013-07-11 11:25 -0700
Re: How do I get the OS System Font Directory(Cross-Platform) in python? Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-07-11 20:13 -0400
Re: How do I get the OS System Font Directory(Cross-Platform) in python? Tim Roberts <timr@probo.com> - 2013-07-12 22:36 -0700
Re: How do I get the OS System Font Directory(Cross-Platform) in python? Metallicow <metaliobovinus@gmail.com> - 2013-07-12 23:38 -0700
Re: How do I get the OS System Font Directory(Cross-Platform) in python? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-07-13 07:20 +0000
csiph-web