In article <[EMAIL PROTECTED]>,
 Bob Ippolito <[EMAIL PROTECTED]> wrote:

> On Mar 29, 2006, at 10:54 AM, Russell E. Owen wrote:
> 
> > How can I get the version of MacOS X within a python program?
> > (e.g. 10.4.5 -- something that is recognizable, rather than the kernel
> > version)....
> 
> platform.mac_ver() -- this is almost definitely broken on Python  
> 2.3.5 on Intel though, because Carbon.* and gestalt are mostly broken  
> there.  The reliable way that has always and should always work is to  
> parse either /usr/bin/sw_vers or /System/Library/CoreServices/ 
> SystemVersion.plist.

Thank you very much! I had just found platform.py via google and was 
starting to study it, but didn't realize it was part of the standard 
library until I got your email.

I'm also glad to know gestalt exists. (I had looked for that, but it's 
not listed in the global module index.)

Also thanks to Kent Quirk for the handy Windows code.

Regards,

-- Russell

_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig

Reply via email to