nextstep_plist

nextstep_plist.load(fp)[source]

Deserialize fp (a .read()-supporting file-like object containing a NeXTSTEP property list document) to a Python object.

nextstep_plist.loads(s)[source]

Deserialize s (a str or unicode instance containing a NeXTSTEP property list document) to a Python object.

If s is a str instance and is encoded with an ASCII based encoding other than utf-8 (e.g. latin-1) then an appropriate encoding name must be specified. Encodings that are not ASCII based (such as UCS-2) are not allowed and should be decoded to unicode first.

class nextstep_plist.PListDecoder(encoding=None)[source]

Simple NeXSTSTEP property list decoder

Performs the following translations in decoding by default:

PList Python
string unicode
binary data bytes
dictionary dict
array list
decode(s, _w=<built-in method match of _sre.SRE_Pattern object>)[source]

Return the Python representation of s (a str or unicode instance containing a plist document)

raw_decode(s, idx=0)[source]

Decode a plist document from s (a str or unicode beginning with a plist document) and return a 2-tuple of the Python representation and the index in s where the document ended.

This can be used to decode a plist document from a string that may have extraneous data at the end.