Python 3: Plist as OrderedDict

Terry Reedy tjreedy at
Tue Feb 9 05:47:20 CET 2010

On 2/8/2010 11:02 PM, Gnarlodious wrote:
> I am trying to read a *.plist into Python 3's OrderedDict but can't
> figure it out. Saying something like this:
> from plistlib import readPlist

As a general note, include a link or something when discussing a 
relatively obscure module that seems not to even be listed in pypi.

> dict=readPlist('/path/file.plist')

Redefining a basic builtin name like 'dict' is usually a bad idea.

> -->  arbitrarily ordered dictionary compared to the XML file
> from collections import OrderedDict
> OrderedDict(readPlist('/path/file.plist'))
> -->  essentially does the same thing as the previous
> readPlist seems to do the scrambling, is this a non-implementation in
> Python 3.1?
> I "upgraded" to Py3 to have OrderedDict, so please don't say it is
> impossible...

I agree with Benjamin -- check the source. Is plistlib 3.x ready?

Terry Jan Reedy

More information about the Python-list mailing list