Python3 fixes - #1
Conversation
|
I'm surprised (but pleased) to find that anyone has used this at all! I switched over to the standard library myself once that gained support for binary plists. Do you have a particular use case that's still unsupported by plistlib? I'd be interested to know more. I'll take a look at the MR when I find some time to do so. |
|
I didn't realize that the standard I just did a little experiment, and >>> plistlib.dumps(jtag.export_plisttags(['Orange', 'image', 'not:a duck']), fmt=plistlib.PlistFormat.FMT_BINARY)
b'bplist00\xa3\x01\x02\x03UimageZnot:a duckXOrange\n7\x08\x0c\x12\x1d\x00\x00\x00\x00\x00\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00&'
>>> bplistlib.dumps(jtag.export_plisttags(['Orange', 'image', 'not:a duck']), binary=True)
b'bplist00\xa3\x01\x02\x03e\x00i\x00m\x00a\x00g\x00ej\x00n\x00o\x00t\x00:\x00a\x00 \x00d\x00u\x00c\x00kh\x00O\x00r\x00a\x00n\x00g\x00e\x00\n\x007\x08\x0c\x17,\x00\x00\x00\x00\x00\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00='I remember when I first wrote this stuff I was pretty concerned about getting binary plist data that looked just like the stuff that MacOS was creating, but at this point in time, I don't know which method is more correct! shrugs I suppose the next time I've got a Mac booted up, I'll check to see how they're storing their tag data these days, and that may or may not result in me saying "sayounara" to bplistlib. In either case, I'd like to thank you for writing it, because for quite a while there, it was the most "correct" implementation I could find! |
I'm getting the feeling I might be the only person still using this library for anything.
Anyways, here's some "not very pretty, but it's something" fixes for anyone who cares about it.