Python 3: Plist as OrderedDict
apt.shansen at gmail.com
Tue Feb 9 18:06:42 CET 2010
On Tue, Feb 9, 2010 at 8:07 AM, Gnarlodious <gnarlodious at gmail.com> wrote:
> To extract the list I am saying this:
> print(list(ordered)) # only a list of keys
> However this seems too laborious. is there an easier way?
I'm not familiar with plistlib or what you're trying to do-- it'd help if
you provided the output from those print's, as I don't have a plist on hand
which I can use to test it out and see what you're seeing.
But, is "ordered.keys()" or "ordered.items()" what you're trying to get? Or,
ordered[ordered.keys()] to get the first one? Or "for key in ordered:
print(ordered[key])" which will get the keys in order and print the values
according to that order?
Basically, I'm not sure what you're actually trying to do.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-list