Skip to content

Instantly share code, notes, and snippets.

@zhuth
Created June 10, 2015 13:08
Show Gist options
  • Save zhuth/362d17529deaa5513f44 to your computer and use it in GitHub Desktop.
Save zhuth/362d17529deaa5513f44 to your computer and use it in GitHub Desktop.
read ns plist data from python
#!/usr/bin/python
#coding: utf-8
import sys, os, biplist as bp
if len(sys.argv) > 1:
fs = [sys.argv[1]]
else:
fs = os.listdir('.')
for f in fs:
try:
data = bp.readPlist(f)['$objects'][1]['NS.data']
with open(f + '.out', 'wb') as f:
f.write(data)
except:
pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment