Created
September 24, 2011 18:04
-
-
Save alexras/1239641 to your computer and use it in GitHub Desktop.
Search for PPC-only or Classic apps on a Mac
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import plistlib | |
import subprocess | |
ppc_apps = [] | |
command = ["system_profiler", "-xml", "SPApplicationsDataType"] | |
task = subprocess.Popen(command, stdout=subprocess.PIPE) | |
(stdout, unused_stderr) = task.communicate() | |
apps = plistlib.readPlistFromString(stdout)[0]["_items"] | |
for app in apps: | |
if "runtime_environment" in app: | |
if app["runtime_environment"] in ["classic", "arch_ppc"]: | |
ppc_apps.append((app["path"], app["runtime_environment"])) | |
for (app, runtime_env) in ppc_apps: | |
print app, '\t', runtime_env |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment