|
Re: how to determine Mac OS X version: msg#00149python.apple
On 28-mei-04, at 8:32, brad.allen@xxxxxxxxxx wrote:
I don't fully remember whether something was changed for Python 2.3, but mac_ver() works nicely for me (MacPython 2.3, MacOSX 10.3). What exactly is the problem you're having? But anyway, if it doesn't work for you the solution is to use the underlying gestalt call: >>> import gestalt >>> print hex(gestalt.gestalt('sysv')) the "sysv" version of gestalt should be interpreted as an 8-bit BCD value followed by 2 4-bit values (which prints out nicely in hex). So 0x1033 means 10.3.3 (not 16.3.3, as MacOSXVI isn't even on the horizon yet:-). "sysv" works all the way back to, uhm, System 7.0 I think. -- Jack Jansen, <Jack.Jansen@xxxxxx>, http://www.cwi.nl/~jack If I can't dance I don't want to be part of your revolution -- Emma Goldman
Pythonmac-SIG maillist - Pythonmac-SIG@xxxxxxxxxx http://mail.python.org/mailman/listinfo/pythonmac-sig |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: How to debug?: 00149, Bob Ippolito |
|---|---|
| Next by Date: | Re: how to determine Mac OS X version: 00149, Jim Tittsler |
| Previous by Thread: | Re: how to determine Mac OS X versioni: 00149, Bob Ippolito |
| Next by Thread: | Re: how to determine Mac OS X version: 00149, Jim Tittsler |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |