logo       

how to determine Mac OS X version: msg#00146

python.apple

Subject: how to determine Mac OS X version


I tried platform.mac_ver(), but this seems to be broken. Google turns up various bug reports on this function.

I can use the shell command system_profiler on 10.3 but it's too slow on 10.2. We still have lots of machines running 10.2, and it will be several months before they can all be upgraded.

sysctl doesn't have a variable for this, only for the Darwin version.

Does anybody know a way to do this using Python or calling an outside shell command? I'd like something that will work for both 10.2 and 10.3 without having to install additional Python modules.

Thanks!_______________________________________________
Pythonmac-SIG maillist - Pythonmac-SIG@xxxxxxxxxx
http://mail.python.org/mailman/listinfo/pythonmac-sig
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise