My application is assumed to be running on a Mac OS X system. However, what I need to do is figure out what version of Mac OS (or Darwin) it is running on, preferably as a
If you want to run a command - like 'uname' - and get the results as a string, use the subprocess module.
import subprocess output = subprocess.Popen(["uname", "-r"], stdout=subprocess.PIPE).communicate()[0]