Re: [Python-Dev] Mapping Darwin 8.2.0 to Mac OS X 10.4.2 in platform.py

2005-09-29 Thread M.-A. Lemburg
Bob Ippolito wrote: > /usr/bin/sw_vers technically calls a private (at least undocumented) > CoreFoundation API, it doesn't parse that plist directly :) > > On further inspection, it looks like parsing the plist directly is > supported API these days (see the bottom of developer.apple.com/doc

Re: [Python-Dev] Mapping Darwin 8.2.0 to Mac OS X 10.4.2 in platform.py

2005-09-22 Thread Wilfredo Sánchez Vega
IIRC, it doesn't exist on such a system; that's a Mac OS command, not a Darwin command. (The man page correctly has "Mac OS X" in the footnote, not "Darwin" or "BSD", though I don't know that you can rely on that 100%.) -wsv On Sep 22, 2005, at 10:20 AM, Guido van Rossum wrote: O

Re: [Python-Dev] Mapping Darwin 8.2.0 to Mac OS X 10.4.2 in platform.py

2005-09-22 Thread Wilfredo Sánchez Vega
Shockingly, it even says that parsing the file is "a better way" than using gestaltSystemVersion(). It's better for python, anyway, I think, since it doesn't require access to the Carbon API set. Be sure to handle the case where the file doesn't exist: import os version_info_

Re: [Python-Dev] Mapping Darwin 8.2.0 to Mac OS X 10.4.2 in platform.py

2005-09-22 Thread Wilfredo Sánchez Vega
"rhapsody" is emitted by uname on Mac OS X Server 1.x, but not on anything we ship today. Bob's right, the version number from uname only tells you about the kernel, and not whether, for example, the Cocoa API is on the system (it wouldn't be on a standalone Darwin OS install, which wil

Re: [Python-Dev] Mapping Darwin 8.2.0 to Mac OS X 10.4.2 in platform.py

2005-09-22 Thread Bob Ippolito
/usr/bin/sw_vers technically calls a private (at least undocumented) CoreFoundation API, it doesn't parse that plist directly :) On further inspection, it looks like parsing the plist directly is supported API these days (see the bottom of ): import plistlib dct = plistlib.Plist.fromFile('/Sy

Re: [Python-Dev] Mapping Darwin 8.2.0 to Mac OS X 10.4.2 in platform.py

2005-09-22 Thread Guido van Rossum
Thanks all! I won't touch it. /usr/bin/sw_vers is the way to go. On 9/22/05, M.-A. Lemburg <[EMAIL PROTECTED]> wrote: > Ronald Oussoren wrote: > > > > On 22-sep-2005, at 5:26, Guido van Rossum wrote: > > > >> The platform module has a way to map system names such as returned by > >> uname() to mar

Re: [Python-Dev] Mapping Darwin 8.2.0 to Mac OS X 10.4.2 in platform.py

2005-09-22 Thread M.-A. Lemburg
Ronald Oussoren wrote: > > On 22-sep-2005, at 5:26, Guido van Rossum wrote: > >> The platform module has a way to map system names such as returned by >> uname() to marketing names. It maps SunOS to Solaris, for example. But >> it doesn't map Darwin to Mac OS X. I think I know how to map Darwin >

Re: [Python-Dev] Mapping Darwin 8.2.0 to Mac OS X 10.4.2 in platform.py

2005-09-21 Thread Ronald Oussoren
On 22-sep-2005, at 5:26, Guido van Rossum wrote: The platform module has a way to map system names such as returned by uname() to marketing names. It maps SunOS to Solaris, for example. But it doesn't map Darwin to Mac OS X. I think I know how to map Darwin version numbers to OS X version numbe

Re: [Python-Dev] Mapping Darwin 8.2.0 to Mac OS X 10.4.2 in platform.py

2005-09-21 Thread Bob Ippolito
On Sep 21, 2005, at 11:26 PM, Guido van Rossum wrote: > The platform module has a way to map system names such as returned by > uname() to marketing names. It maps SunOS to Solaris, for example. But > it doesn't map Darwin to Mac OS X. I think I know how to map Darwin > version numbers to OS X ver

Re: [Python-Dev] Mapping Darwin 8.2.0 to Mac OS X 10.4.2 in platform.py

2005-09-21 Thread Guido van Rossum
On 9/21/05, Guido van Rossum <[EMAIL PROTECTED]> wrote: > The platform module has a way to map system names such as returned by > uname() to marketing names. It maps SunOS to Solaris, for example. But > it doesn't map Darwin to Mac OS X. I think I know how to map Darwin > version numbers to OS X ve

[Python-Dev] Mapping Darwin 8.2.0 to Mac OS X 10.4.2 in platform.py

2005-09-21 Thread Guido van Rossum
The platform module has a way to map system names such as returned by uname() to marketing names. It maps SunOS to Solaris, for example. But it doesn't map Darwin to Mac OS X. I think I know how to map Darwin version numbers to OS X version numbers: from http://www.opensource.apple.com/darwinsource