Skip to content

Instantly share code, notes, and snippets.

@superzazu
Created January 29, 2018 17:44
Show Gist options
  • Save superzazu/d33718daab133e7396cf7b5af508804b to your computer and use it in GitHub Desktop.
Save superzazu/d33718daab133e7396cf7b5af508804b to your computer and use it in GitHub Desktop.
Python3 script that lists all non-64bit apps on your mac
"""
check64.py: python3 script that lists all apps that don't contain Intel 64bit
code. Tested on macOS 10.13.3 with Python 3.6.4, no external deps
"""
import plistlib
import subprocess
if __name__ == "__main__":
app_profile = subprocess.check_output(
["system_profiler", "SPApplicationsDataType", "-xml"])
apps_info = plistlib.loads(app_profile)
for app in apps_info[0]["_items"]:
if app["has64BitIntelCode"] == "no":
print("{} is not Intel 64bit ready ({})".format(
app["_name"], app["path"], app["runtime_environment"]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment