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
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
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_
"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
/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
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
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
>
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
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
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
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
11 matches
Mail list logo