How can I find my Mac OS X build number? And if possible, is there a way to find it using Python? I would like to use Python so that I can automatically make OS X .app files in an automated fashion.
EDIT: I see the 'Marked as duplicate' messages, and realize that people think that I mean the Mac OS X VERSION number. I'm talking about the BUILD number.
Oddly enough, the OS X build number does not seem to be available through the platform module. OS X does provide a sw_vers command which can be used to retrieve the build number through os.popen.
Example:
import os
print(os.popen("sw_vers -buildVersion").read().strip())
Output on OS X 10.9.4 Mavericks:
13E28
Not ideal, but it works!
Try the platform module? It will get you just about everything Python knows about the version of the OS, as well as info about the Python interpreter itself.
https://docs.python.org/2/library/platform.htm
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With