Last active
April 16, 2018 11:46
-
-
Save erikng/add9fabe43a9afc46b959f2844940271 to your computer and use it in GitHub Desktop.
Revisions
-
erikng revised this gist
Jan 11, 2018 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -7,6 +7,6 @@ output, err = proc.communicate() plist = plistlib.readPlistFromString(output) items = plist[0]['_items'] for item in sorted(items, key=lambda x: x.get('path')): if 'no' in item.get('has64BitIntelCode'): print [item.get('path'), item.get('_name'), item.get('version')] -
erikng revised this gist
Jan 11, 2018 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -8,5 +8,5 @@ plist = plistlib.readPlistFromString(output) items = plist[0]['_items'] for item in items: if 'no' in item.get('has64BitIntelCode'): print [item.get('path'), item.get('_name'), item.get('version')] -
erikng revised this gist
Jan 11, 2018 . 1 changed file with 4 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -6,7 +6,7 @@ proc = subprocess.Popen(cmd, shell=False, bufsize=-1, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE) output, err = proc.communicate() plist = plistlib.readPlistFromString(output) items = plist[0]['_items'] for item in items: if 'no' in item['has64BitIntelCode']: print [item['path'], item['_name'], item['version']] -
erikng revised this gist
Jan 10, 2018 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,5 @@ #!/usr/bin/python import subprocess import plistlib cmd = ['/usr/sbin/system_profiler', '-xml', 'SPApplicationsDataType'] -
erikng created this gist
Jan 10, 2018 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,10 @@ import subprocess import plistlib cmd = ['/usr/sbin/system_profiler', '-xml', 'SPApplicationsDataType'] proc = subprocess.Popen(cmd, shell=False, bufsize=-1, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE) output, err = proc.communicate() plist = plistlib.readPlistFromString(output) test = plist[0]['_items'] for x in test: if 'no' in x['has64BitIntelCode']: print [x['path'], x['_name']]