d9pouces <pyt...@19pouces.net> added the comment:

Here is the new patch, allowing read and write binary, json and xml plist files.

It includes both the plistlib.py and test/test_plistlib.py patches.
JSON format does not allow dates and data, so XML is used by default to write 
files.
I use the json library to write JSON plist files, but its output is slightly 
different from the Apple default output: keys of dictionaries are in different 
order. Thus, I removed the test_appleformattingfromliteral test for JSON files.

Similarly, my binary writer does not write the same binary files as the Apple 
library: my library writes the content of compound objects (dicts, lists and 
sets) before the object itself, while Apple writes the object before its 
content. Copying the Apple behavior results in some additional weird lines of 
code, for little benefit. Thus, I also removed the  
test_appleformattingfromliteral test for binary files.

Other tests are made for all the three formats.

----------
Added file: http://bugs.python.org/file25156/plistlib_with_test.diff

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue14455>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to