I\'m using plistlib to create and update a simple plist file in OS X. A tester in Norway is getting an error from plistlib:
File \"../axeomatic2/normal/bui
I had the similar problem before, after I try biplist, it's solved.
Binary plist support has been added to plistlib
since python 3.4.
https://docs.python.org/3.4/library/plistlib.html
There's actually two categories of plist
format. One is actually simple XML file (which plistlib
knows how to parse with expat
), the other one is binary property list
.
Unfortunately they both share the same suffix .plist
, and all the tools from Apple treat them transparently (e.g. you don't know if you are working with an XML plist or a binary plist, using tools like defaults
)
Like @northtree said, the biplist
package is the right tool to read/write the binary plist file.
UPDATE:
You can also use plutil(1)
that comes with OSX to convert any plist
file back to XML format, and then processed by plistlib
https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/plutil.1.html