farcaller / bplist-python Goto Github PK
View Code? Open in Web Editor NEWApple binary Property List reader/writer for Python
License: MIT License
Apple binary Property List reader/writer for Python
License: MIT License
>>> from bplist import BPlistReader
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: cannot import name 'BPlistReader' from 'bplist' (/usr/local/lib/python3.8/site-packages/bplist/__init__.py)
Occured on macOS 10.15.7. Installed python 3.8 via homebrew.
A quick look into the __init__.py
didn't give me any hint why this occurs.
However this works:
from bplist import *
print(dir(bplist))
I've extracted bplist data from a sqlite row of data from iTunes backup. When I try to parse it like this: BPListReader.plistWithString(bplist_str)
I get this error:
python2.7/site-packages/bplist/bplist.py", line 147, in __unpackItem
obj_type, obj_info = (obj_header & 0xF0), (obj_header & 0x0F)
TypeError: unsupported operand type(s) for &: 'str' and 'int'
Did a little inspecting in pdb:
(Pdb) !type(obj_header)
<type 'str'>
(Pdb) !len(obj_header)
1
(Pdb) !obj_header
'\xd4'
(Pdb) !obj_type, obj_info = (obj_header & 0xF0), (obj_header & 0x0F)
*** TypeError: unsupported operand type(s) for &: 'str' and 'int'
I rather not share the bplist data since I don't what personal data is in it but If I save the bplist data to a file and preview in finder, it's able to parse the data:
with open('/temp/blist-test.plist', 'w') as f:
f.write(bplist_str)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.