Nicholas Riley <[EMAIL PROTECTED]> wrote:

> In [3]: plist, format, error =
>NSPropertyListSerialization.propertyListFromData_mutabilityOption_forma
>t_errorDescription_(NSData.dataWithContentsOfMappedFile_(os.path.expand
>user('~/Library/Preferences/com.apple.keychainsync.plist')),
>NSPropertyListImmutable, 0)
> 
> In [4]: plist Out[4]: {KeychainSyncList = (); }
> 
> In [5]: data, error =
> NSPropertyListSerialization.dataFromPropertyList_format_errorDescription_(
> plist, NSPropertyListXMLFormat_v1_0)
>
> [...]

thanks, that works exactly the way I need it. I found out you can get
the string faster if you convert the NSData right away:

s = NSString.alloc().initWithData_encoding_(data, NSUTF8StringEncoding)


Florian

_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig

Reply via email to