Created
June 10, 2015 13:08
-
-
Save zhuth/362d17529deaa5513f44 to your computer and use it in GitHub Desktop.
read ns plist data from python
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 | |
#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