pythonmacosoperating-systemrosetta

How to tell if rosetta is installed?


I am working on a Python script that will rely on rosetta being installed. Rosetta is a dynamic binary translator for Mac OS X which allows many PowerPC applications to run on certain Intel-based Macintosh computers without modification. Is there anyway for to check the OS to see if rosetta is there?


Solution

  • Haven't got rosetta installed anymore but if I recall correctly it would give some kind of usage screen if you just type translate (rosetta command line). If so, something like this should work.

    if os.system("/usr/libexec/oah/translate > /dev/null 2>&1"):
      print "Not installed"
    else:
      print "Installed"