[Python-Dev] Mapping Darwin 8.2.0 to Mac OS X 10.4.2 in platform.py (original) (raw)
M.-A. Lemburg mal at egenix.com
Thu Sep 29 12:33:21 CEST 2005
- Previous message: [Python-Dev] Mapping Darwin 8.2.0 to Mac OS X 10.4.2 in platform.py
- Next message: [Python-Dev] Visibility scope for "for/while/if" statements
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Bob Ippolito wrote:
/usr/bin/swvers 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 <http://_ _developer.apple.com/documentation/Carbon/Reference/GestaltManager/_ _gestaltrefchap/chapter1.4section181.html>): import plistlib dct = plistlib.Plist.fromFile('/System/Library/CoreServices/ SystemVersion.plist') print '%(ProductName)s %(ProductVersion)s' % dct
Is the plistlib module always available on Mac OS X ?
Could you write a patch to system_alias() which uses the above method if available for Mac OS ?
-bob
On Sep 22, 2005, at 1:02 PM, Wilfredo Sánchez Vega wrote:
"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 will have the same uname output). Just FYI, /usr/bin/swvers parses /System/Library/CoreServices/ SystemVersion.plist, which is XML. If you want that info, parsing the file may be more efficient than forking off swvers. -wsv
On Sep 21, 2005, at 8:28 PM, Guido van Rossum wrote:
I forgot. The current code recognizes 'Rhapsody' and maps it to "MacOS X Server". But I don't see any evidence that Apple still uses the code name Rhapsody. Does uname ever return 'Rhapsody'?
Python-Dev mailing list Python-Dev at python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/mal%40egenix.com
-- Marc-Andre Lemburg eGenix.com
Professional Python Services directly from the Source (#1, Sep 29 2005)
Python/Zope Consulting and Support ... http://www.egenix.com/ mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::
- Previous message: [Python-Dev] Mapping Darwin 8.2.0 to Mac OS X 10.4.2 in platform.py
- Next message: [Python-Dev] Visibility scope for "for/while/if" statements
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]