On Tue, Feb 9, 2010 at 8:07 AM, Gnarlodious <span dir="ltr"><<a href="mailto:gnarlodious@gmail.com">gnarlodious@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div class="im">To extract the list I am saying this:</div>
<br>
ordered=plistlib.readPlist(path)<br>
print(list(ordered))  # only a list of keys<br>
print(ordered[list(ordered)[0]])<br>
<br>
However this seems too laborious. is there an easier way?<br></blockquote><div><br></div><div>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.</div>

<div><br></div><div>But, is "ordered.keys()" or "ordered.items()" what you're trying to get? Or, ordered[ordered.keys()[0]] 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?</div>

<div><br></div><div>Basically, I'm not sure what you're actually trying to do.</div><div><br></div></div><div name="mailplane_signature">--S</div>