AlkantarClanX12

Your IP : 18.117.145.67


Current Path : /proc/self/root/opt/alt/python35/lib64/python3.5/__pycache__/
Upload File :
Current File : //proc/self/root/opt/alt/python35/lib64/python3.5/__pycache__/plistlib.cpython-35.pyc



��YfB|�
@s�dZddddddddd	d
ddd
g
ZddlZddlZddlZddlZddlZddlmZddl	Z	ddl
Z
ddlZddlZddl
mZddlmZejddde�Ze�jej�Gdd�de�ZGdd�de�Zejdd��ZGdd�de�Zdd�Zdd�Zdd�Zdd�Z Gd d�d�Z!d!Z"ej#d"�Z$d#d$d%�Z%d&d'�Z&ej#d(ej'�Z(d)d*�Z)d+d,�Z*d-d.�Z+Gd/d0�d0�Z,Gd1d2�d2�Z-Gd3d4�d4e-�Z.d5d6�Z/Gd7d8�d8e0�Z1d9d:d;d<d=d>d?d@iZ2e3�Z4GdAdB�dB�Z5dCdD�Z6e7e8e9eje:fZ;GdEdF�dFe3�Z<dGdH�Z=e>edIe/dJe,dKe.�e?edIe=dJe5dKe<�iZ@dLddMdNdOedPd
�ZAdLddMdNdOedQd�ZBdLe>dRdNdSdTdUd�ZCdLe>dSdTdRdNdVd
�ZDdS)Wa�plistlib.py -- a tool to generate and parse MacOSX .plist files.

The property list (.plist) file format is a simple XML pickle supporting
basic object types, like dictionaries, lists, numbers and strings.
Usually the top level object is a dictionary.

To write out a plist file, use the dump(value, file)
function. 'value' is the top level object, 'file' is
a (writable) file object.

To parse a plist from a file, use the load(file) function,
with a (readable) file object as the only argument. It
returns the top level object (again, usually a dictionary).

To work with plist data in bytes objects, you can use loads()
and dumps().

Values can be strings, integers, floats, booleans, tuples, lists,
dictionaries (but only with string keys), Data, bytes, bytearray, or
datetime.datetime objects.

Generate Plist example:

    pl = dict(
        aString = "Doodah",
        aList = ["A", "B", 12, 32.1, [1, 2, 3]],
        aFloat = 0.1,
        anInt = 728,
        aDict = dict(
            anotherString = "<hello & hi there!>",
            aUnicodeValue = "M\xe4ssig, Ma\xdf",
            aTrueValue = True,
            aFalseValue = False,
        ),
        someData = b"<binary gunk>",
        someMoreData = b"<lots of binary gunk>" * 10,
        aDate = datetime.datetime.fromtimestamp(time.mktime(time.gmtime())),
    )
    with open(fileName, 'wb') as fp:
        dump(pl, fp)

Parse Plist example:

    with open(fileName, 'rb') as fp:
        pl = load(fp)
    print(pl["aKey"])
�	readPlist�
writePlist�readPlistFromBytes�writePlistToBytes�Plist�Data�Dict�FMT_XML�
FMT_BINARY�load�dump�loads�dumps�N)�BytesIO)�warn)�ParserCreate�PlistFormatzFMT_XML FMT_BINARY�modulec@s:eZdZfZdd�Zdd�Zdd�ZdS)�
_InternalDictcCsCy||}Wntk
r.t|��YnXtdtd�|S)NzLAttribute access from plist dicts is deprecated, use d[key] notation instead�)�KeyError�AttributeErrorr�DeprecationWarning)�self�attr�value�r�-/opt/alt/python35/lib64/python3.5/plistlib.py�__getattr__Vs

z_InternalDict.__getattr__cCstdtd�|||<dS)NzLAttribute access from plist dicts is deprecated, use d[key] notation insteadr)rr)rrrrrr�__setattr___s
z_InternalDict.__setattr__cCs@y||=Wntk
r+t|��YnXtdtd�dS)NzLAttribute access from plist dicts is deprecated, use d[key] notation insteadr)rrrr)rrrrr�__delattr__ds
z_InternalDict.__delattr__N)�__name__�
__module__�__qualname__�	__slots__rrr rrrrrOs	rcs"eZdZ�fdd�Z�S)rcs$tdtd�t�j|�dS)Nz?The plistlib.Dict class is deprecated, use builtin dict insteadr)rr�super�__init__)r�kwargs)�	__class__rrr&os
z
Dict.__init__)r!r"r#r&rr)r(rrmsc	cs9t|t�r0t||��}|VWdQRXn|VdS)N)�
isinstance�str�open)�
pathOrFile�mode�fprrr�_maybe_openusr/csFeZdZdZ�fdd�Zedd��Zdd�Z�S)rzuThis class has been deprecated. Use dump() and load()
    functions instead, together with regular dict objects.
    cs$tdtd�t�j|�dS)NzJThe Plist class is deprecated, use the load() and dump() functions insteadr)rrr%r&)rr')r(rrr&�s
zPlist.__init__c	Cs?t|d��}t|�}WdQRX|�}|j|�|S)z,Deprecated. Use the load() function instead.�rbN)r/r
�update)�clsr,r.rZplistrrr�fromFile�s
	
zPlist.fromFilec
Cs*t|d��}t||�WdQRXdS)z,Deprecated. Use the dump() function instead.�wbN)r/r)rr,r.rrr�write�szPlist.write)r!r"r#�__doc__r&�classmethodr3r5rr)r(rrs	cCsItdtd�t|d��#}t|dddddt�SWdQRXdS)	z�
    Read a .plist from a path or file. pathOrFile should either
    be a file name, or a readable binary file object.

    This function is deprecated, use load instead.
    z8The readPlist function is deprecated, use load() insteadrr0�fmtN�use_builtin_typesF�	dict_type)rrr/r
r)r,r.rrrr�s

cCsLtdtd�t|d��&}t||dtdddd�Wd	QRXd	S)
z�
    Write 'value' to a .plist file. 'pathOrFile' may either be a
    file name or a (writable) file object.

    This function is deprecated, use dump instead.
    z9The writePlist function is deprecated, use dump() insteadrr4r8�	sort_keysT�skipkeysFN)rrr/rr)rr,r.rrrr�s
cCs2tdtd�tt|�dddddt�S)z}
    Read a plist data from a bytes object. Return the root object.

    This function is deprecated, use loads instead.
    zBThe readPlistFromBytes function is deprecated, use loads() insteadrr8Nr9Fr:)rrr
rr)�datarrrr�s
c	CsBtdtd�t�}t||dtdddd�|j�S)zp
    Return 'value' as a plist-formatted bytes object.

    This function is deprecated, use dumps instead.
    zAThe writePlistToBytes function is deprecated, use dumps() insteadrr8r;Tr<F)rrrrr�getvalue)r�frrrr�s

	c@s[eZdZdZdd�Zedd��Zddd�Zd	d
�Zdd�Z	d
S)rz]
    Wrapper for binary data.

    This class is deprecated, use a bytes object instead.
    cCs(t|t�std��||_dS)Nzdata must be as bytes)r)�bytes�	TypeErrorr=)rr=rrrr&�sz
Data.__init__cCs|t|��S)N)�_decode_base64)r2r=rrr�
fromBase64�szData.fromBase64�LcCst|j|�S)N)�_encode_base64r=)r�
maxlinelengthrrr�asBase64�sz
Data.asBase64cCsFt||j�r"|j|jkSt|t�r>|j|kStSdS)N)r)r(r=r@�NotImplemented)r�otherrrr�__eq__�s

zData.__eq__cCsd|jjt|j�fS)Nz%s(%s))r(r!�reprr=)rrrr�__repr__�sz
Data.__repr__N)
r!r"r#r6r&r7rCrGrJrLrrrrr�ss�<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
zv[\x00\x01\x02\x03\x04\x05\x06\x07\x08\x0b\x0c\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f]rDcCsn|dd}g}xJtdt|�|�D]0}||||�}|jtj|��q-Wdj|�S)N��r�)�range�len�append�binasciiZ
b2a_base64�join)�srFZ
maxbinsize�pieces�i�chunkrrrrEsrEcCs6t|t�r%tj|jd��Stj|�SdS)Nzutf-8)r)r*rSZ
a2b_base64�encode)rUrrrrB
srBz{(?P<year>\d\d\d\d)(?:-(?P<month>\d\d)(?:-(?P<day>\d\d)(?:T(?P<hour>\d\d)(?::(?P<minute>\d\d)(?::(?P<second>\d\d))?)?)?)?)?ZcCsid}tj|�j�}g}x8|D]0}||}|dkrEP|jt|��q(Wtj|�S)N�year�month�day�hour�minute�second)rZr[r\r]r^r_)�_dateParser�match�	groupdictrR�int�datetime)rU�orderZgdZlst�key�valrrr�_date_from_strings

rhcCs,d|j|j|j|j|j|jfS)Nz%04d-%02d-%02dT%02d:%02d:%02dZ)rZr[r\r]r^r_)�drrr�_date_to_string&srjcCs�tj|�}|dk	r'td��|jdd�}|jdd�}|jdd�}|jdd�}|jd	d
�}|S)Nz<strings can't contains control characters; use bytes insteadz
�
�
�&z&amp;�<z&lt;�>z&gt;)�_controlCharPat�search�
ValueError�replace)�text�mrrr�_escape,srvc@s�eZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd �Zd!d"�Zd#d$�Zd%d&�Zd'S)(�_PlistParsercCs1g|_d|_d|_||_||_dS)N)�stack�current_key�root�_use_builtin_types�
_dict_type)rr9r:rrrr&9s
				z_PlistParser.__init__cCsPt�|_|j|j_|j|j_|j|j_|jj|�|j	S)N)
r�parser�handle_begin_elementZStartElementHandler�handle_end_elementZEndElementHandler�handle_dataZCharacterDataHandlerZ	ParseFilerz)rZfileobjrrr�parse@sz_PlistParser.parsecCs9g|_t|d|d�}|dk	r5||�dS)NZbegin_)r=�getattr)r�element�attrs�handlerrrrr~Hs	z!_PlistParser.handle_begin_elementcCs-t|d|d�}|dk	r)|�dS)NZend_)r�)rr�r�rrrrNsz_PlistParser.handle_end_elementcCs|jj|�dS)N)r=rR)rr=rrrr�Ssz_PlistParser.handle_datacCs�|jdk	rat|jdti��sAtd|jj��||jd|j<d|_n[|jsv||_nFt|jdtg��s�td|jj��|jdj|�dS)N�zunexpected element at line %d���r�r�r�)	ryr)rx�typerrr}�CurrentLineNumberrzrR)rrrrr�
add_objectVs	z_PlistParser.add_objectcCsdj|j�}g|_|S)N�)rTr=)rr=rrr�get_datafs	z_PlistParser.get_datacCs-|j�}|j|�|jj|�dS)N)r|r�rxrR)rr�rirrr�
begin_dictms
z_PlistParser.begin_dictcCs9|jr(td|j|jjf��|jj�dS)Nz%missing value for key '%s' at line %d)ryrrr}r�rx�pop)rrrr�end_dictrs	z_PlistParser.end_dictcCsO|js&t|jdti��r<td|jj��|j�|_dS)Nr�zunexpected key at line %dr�)ryr)rxr�rrr}r�r�)rrrr�end_keyxs&z_PlistParser.end_keycCs'g}|j|�|jj|�dS)N)r�rxrR)rr��arrr�begin_array~s
z_PlistParser.begin_arraycCs|jj�dS)N)rxr�)rrrr�	end_array�sz_PlistParser.end_arraycCs|jd�dS)NT)r�)rrrr�end_true�sz_PlistParser.end_truecCs|jd�dS)NF)r�)rrrr�	end_false�sz_PlistParser.end_falsecCs|jt|j���dS)N)r�rcr�)rrrr�end_integer�sz_PlistParser.end_integercCs|jt|j���dS)N)r��floatr�)rrrr�end_real�sz_PlistParser.end_realcCs|j|j��dS)N)r�r�)rrrr�
end_string�sz_PlistParser.end_stringcCsE|jr%|jt|j���n|jtj|j���dS)N)r{r�rBr�rrC)rrrr�end_data�s	z_PlistParser.end_datacCs|jt|j���dS)N)r�rhr�)rrrr�end_date�sz_PlistParser.end_dateN)r!r"r#r&r�r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrw8s&rwc@sUeZdZdddd�Zdd�Zdd�Zd	d
d�Zdd
�Zd	S)�_DumbXMLWriterr�	cCs(||_g|_||_||_dS)N)�filerx�
_indent_level�indent)rr��indent_levelr�rrrr&�s			z_DumbXMLWriter.__init__cCs4|jj|�|jd|�|jd7_dS)Nz<%s>r�)rxrR�writelnr�)rr�rrr�
begin_element�sz_DumbXMLWriter.begin_elementcCsT|jdkst�|jj�|ks0t�|jd8_|jd|�dS)Nrr�z</%s>)r��AssertionErrorrxr�r�)rr�rrr�end_element�sz_DumbXMLWriter.end_elementNcCsJ|dk	r5t|�}|jd|||f�n|jd|�dS)Nz<%s>%s</%s>z<%s/>)rvr�)rr�rrrr�simple_element�sz_DumbXMLWriter.simple_elementcCsb|rNt|t�r$|jd�}|jj|j|j�|jj|�|jjd�dS)Nzutf-8s
)r)r*rYr�r5r�r�)r�linerrrr��sz_DumbXMLWriter.writeln)r!r"r#r&r�r�r�r�rrrrr��s
r�c@sseZdZddddddd�Zdd	�Zd
d�Zdd
�Zdd�Zdd�Zdd�Z	dS)�_PlistWriterrs	r�TFcCs?|r|jt�tj||||�||_||_dS)N)r5�PLISTHEADERr�r&�
_sort_keys�	_skipkeys)rr�r�r�ZwriteHeaderr;r<rrrr&�s

	z_PlistWriter.__init__cCs+|jd�|j|�|jd�dS)Nz<plist version="1.0">z</plist>)r��write_value)rrrrrr5�s

z_PlistWriter.writecCs�t|t�r"|jd|�nz|dkr>|jd�n^|dkrZ|jd�nBt|t�r�d|ko�dknr�|jd	d
|�q�t|��n�t|t�r�|jdt|��n�t|t�r�|j|�n�t|t	�r|j
|�n�t|ttf�r6|j
|�nft|tj�ra|jdt|��n;t|ttf�r�|j|�ntd
t|���dS)N�stringT�trueF�falser��?�@Zintegerz%d�realZdatezunsupported type: %sr�l����l)r)r*r�rc�
OverflowErrorr�rK�dict�
write_dictr�
write_datar@�	bytearray�write_bytesrdrj�tuple�list�write_arrayrAr�)rrrrrr��s.z_PlistWriter.write_valuecCs|j|j�dS)N)r�r=)rr=rrrr��sz_PlistWriter.write_datacCs�|jd�|jd8_tddt|jjdd	�|j��}x3t||�jd�D]}|rd|j|�qdW|jd7_|j	d�dS)
Nr=r��rDs	� �s
s        )
r�r��maxrQr�rsrE�splitr�r�)rr=rFr�rrrr��s
)z_PlistWriter.write_bytescCs�|r�|jd�|jr1t|j��}n|j�}xX|D]P\}}t|t�sw|jrkqDtd��|jd|�|j	|�qDW|j
d�n
|jd�dS)Nr�zkeys must be stringsrf)r�r��sorted�itemsr)r*r�rAr�r�r�)rrir�rfrrrrr�s
		z_PlistWriter.write_dictcCsR|rA|jd�x|D]}|j|�qW|jd�n
|jd�dS)N�array)r�r�r�r�)rr�rrrrr�s

z_PlistWriter.write_arrayN)
r!r"r#r&r5r�r�r�r�r�rrrrr��s	%
r�cCs�d	}x!|D]}|j|�r
dSq
Wx�tjdftjdftjdffD]k\}}|j|�ssqUxJ|D]B}||jd�j|�}|dt|��|krzdSqzWqUWdS)
N�<?xml�<plistTzutf-8z	utf-16-bez	utf-16-le�asciiF)r�r�)�
startswith�codecs�BOM_UTF8�BOM_UTF16_BE�BOM_UTF16_LE�decoderYrQ)�header�prefixesZpfxZbom�encoding�start�prefixrrr�_is_fmt_xml*s

r�c@seZdZddd�ZdS)�InvalidFileExceptionzInvalid filecCstj||�dS)N)rrr&)r�messagerrrr&LszInvalidFileException.__init__N)r!r"r#r&rrrrr�Ksr�r��Br�HrM�Lr��Qc@s^eZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dS)�_BinaryPlistParsera
    Read or write a binary plist file, following the description of the binary
    format.  Raise InvalidFileException in case of error, otherwise return the
    root object.

    see also: http://opensource.apple.com/source/CF/CF-744.18/CFBinaryPList.c
    cCs||_||_dS)N)r{r|)rr9r:rrrr&[s	z_BinaryPlistParser.__init__c
Cs�y�||_|jjdtj�|jjd�}t|�dkrOt��tjd|�\}|_	}}}|jj|�|j
||�|_tg||_
|j|�SWn'tttjfk
r�t��YnXdS)N� z>6xBBQQQi��)�_fp�seek�os�SEEK_END�readrQr��struct�unpack�	_ref_size�
_read_ints�_object_offsets�
_undefined�_objects�_read_object�OSError�
IndexError�error)rr.�trailer�offset_size�num_objects�
top_object�offset_table_offsetrrrr�_s		$z_BinaryPlistParser.parsecCsb|dkr^|jjd�dd@}d|>}dt|}tj||jj|��dS|S)z$ return the size of the next object.�r�rrNro)r�r��_BINARY_FORMATr�r�)r�tokenLrurUr?rrr�	_get_sizews
 z_BinaryPlistParser._get_sizecsr|jj�|���tkr>tjdt�|��St��fdd�td�|��D��SdS)Nroc3s/|]%}tj�||��d�VqdS)�bigN)rc�
from_bytes)�.0rW)r=�sizerr�	<genexpr>�sz0_BinaryPlistParser._read_ints.<locals>.<genexpr>r)r�r�r�r�r�r�rP)r�nr�r)r=r�rr��s
z_BinaryPlistParser._read_intscCs|j||j�S)N)r�r�)rr�rrr�
_read_refs�sz_BinaryPlistParser._read_refsc
s��j|}|tk	r|S�j|}�jj|��jjd�d}|d@|d@}}|dkrzd}n�|dkr�d}n�|dkr�d	}n�|dkr�d
}n�|dkr�tj�jjd|>�dd
|dk�}n�|dkr'tj	d�jjd��d}nQ|dkrXtj	d�jjd��d}n |dkr�tj	d�jjd��d}t
j
ddd�t
jd|�}n�|dkr�j|�}�j
r��jj|�}qxt�jj|��}nv|dkrA�j|�}�jj|�jd�}|}n7|dkr~�j|�}�jj|d�jd�}n�|dkr��j|�}�j|�}	g}|�j|<|j�fdd�|	D��n�|d kro�j|�}�j|�}
�j|�}	�j�}|�j|<xEt|
|	�D](\}}�j|�|�j|�<q@Wn	t��|�j|<|S)!zx
        read the object by reference.

        May recursively read sub-objects (content of an array/dict/set)
        r�r��r�Nr�F�	TrOr�r��signedrN�"z>frM�#z>d�3i�Zsecondsr��Pr��`rzutf-16be�c3s|]}�j|�VqdS)N)r�)r��x)rrrr��sz2_BinaryPlistParser._read_object.<locals>.<genexpr>��)r�r�r�r�r�r�rcr�r�r�rdZ	timedeltar�r{rr�r��extendr|�zipr�r�)
r�ref�result�offset�tokenZtokenHr�r?rUZobj_refsZkey_refs�k�or)rrr��sn

				%%"		"
#
#	
z_BinaryPlistParser._read_objectN)
r!r"r#r6r&r�r�r�r�r�rrrrr�Ss
r�cCs:|dkrdS|dkr dS|d>d>r2dSdSdS)	Nr�r�r�rr�rM�ir)�countrrr�_count_to_size�src@sXeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
S)�_BinaryPlistWritercCs||_||_||_dS)N)r�r�r�)rr.r;r<rrrr&�s		z_BinaryPlistWriter.__init__c
Cs3g|_i|_i|_|j|�t|j�}dg||_t|�|_t|j|_	|j
jd�x|jD]}|j|�q�W|j
|�}|j
j�}t|�}dt||}|j
jtj||j��d}|||j|||f}	|j
jtjd|	��dS)Nrsbplist00roz	>5xBBBQQQ)�_objlist�	_objtable�_objidtable�_flattenrQr�rr�r��_ref_formatr�r5�
_write_object�
_getrefnum�tellr��pack)
rrr��objr�r�r�Z
offset_formatZsort_versionr�rrrr5�s(			
z_BinaryPlistWriter.writec	Cst|t�r1t|�|f|jkr�dSnPt|t�rht|j�|jf|jkr�dSnt|�|jkr�dSt|j	�}|j	j
|�t|t�r�||jt|�|f<nDt|t�r�||jt|j�|jf<n||jt|�<t|t�r�g}g}|j�}|j
rKt|�}xU|D]M\}}t|t�s�|jryqRtd��|j
|�|j
|�qRWx]tj||�D]}|j|�q�Wn3t|ttf�rx|D]}|j|�q�WdS)Nzkeys must be strings)r)�_scalarsr�rrr=�idrrQrrRr�r�r�r�r*r�rA�	itertools�chainrr�r�)	rrZrefnum�keys�valuesr�r�vr
rrrr,sB!"		

z_BinaryPlistWriter._flattencCsgt|t�r&|jt|�|fSt|t�rR|jt|j�|jfS|jt|�SdS)N)r)rrr�rr=rr)rrrrrr\s
z_BinaryPlistWriter._getrefnumcCs�|dkr/|jjtjd||B��n�|dkrd|jjtjd|dBd|��n�|dkr�|jjtjd|dBd|��n[|dkr�|jjtjd
|dBd|��n&|jjtjd|dBd
|��dS)Nr�z>Br�r�z>BBBr�z>BBH�r�z>BBL�z>BBQ�ril)r�r5r�r)rrr�rrr�_write_sizeds#)))z_BinaryPlistWriter._write_sizecs�j|�}�jj��j|<|dkrD�jjd�n�|dkrc�jjd�n�|dkr��jjd�n�t|t�r�|dkr�y#�jjtjdd|��Wq�tj	k
r�t
|�d�Yq�Xq|d'kr�jjtjdd|��q|d(krF�jjtjd
d|��q|d)krt�jjtjdd|��q|d*kr��jjtjdd|��q|d+kr��jjd|jdddd��qt
|��n&t|t�r�jjtjdd|��n�t|t
j
�rj|t
j
dd	d	�j�}�jjtjdd|��n�t|t�r��jdt|j���jj|j�ndt|ttf�r��jdt|���jj|�n&t|t�roy)|jd�}�jdt|��Wn;tk
r[|jd�}�jdt|�d �YnX�jj|�n�t|ttf�r��fd!d"�|D�}t|�}�jd#|��jjtjd$�j||��n)t|t�rgg}}�jrt|j��}	n|j�}	xg|	D]_\}
}t|
t�sc�jrWq0t d%��|j!�j|
��|j!�j|��q0Wt|�}�jd&|��jjtjd$�j||���jjtjd$�j||��nt |��dS),NsFsTs	rz>Bqr%r�r�z>BBr�z>BHr#r�z>BLr$r�z>BQr�sr�r�z>Bdr�i�rr�rzutf-16berrcsg|]}�j|��qSr)r)r�r
)rrr�
<listcomp>�s	z4_BinaryPlistWriter._write_object.<locals>.<listcomp>rrozkeys must be stringsrrilll)"rr�rr�r5r)rcr�rr�r��to_bytesr�rdZ
total_secondsrr&rQr=r@r�r*rY�UnicodeEncodeErrorr�r�rr�r�r�r�r�rArR)rrrr?�tZrefsrUZkeyRefsZvalRefsZ	rootItemsrr"r)rrrts�#"""")""
*
		'*z _BinaryPlistWriter._write_objectN)	r!r"r#r&r5rrr&rrrrrr�s-0rcCs|dd�dkS)Nr�sbplist00r)r�rrr�_is_fmt_binary�sr+�detectr}�writerr8r9Tr:cCs�|dkrf|jd�}|jd�xItj�D]!}|d|�r5|d}Pq5Wt��nt|d}|d|d|�}|j|�S)z�Read a .plist file. 'fp' should be (readable) file object.
    Return the unpacked root object (which usually is a dictionary).
    Nr�rr,r}r9r:)r�r��_FORMATSr!r�r�)r.r8r9r:r��info�P�prrrr
�s

cCs(t|�}t|d|d|d|�S)zqRead a .plist file from a bytes object.
    Return the unpacked root object (which usually is a dictionary).
    r8r9r:)rr
)rr8r9r:r.rrrr�sr;r<FcCsP|tkrtd|f��t|d|d|d|�}|j|�dS)zQWrite 'value' to a .plist file. 'fp' should be a (writable)
    file object.
    zUnsupported format: %rr-r;r<N)r.rrr5)rr.r8r;r<r-rrrrs c	Cs2t�}t||d|d|d|�|j�S)z?Return a bytes object with the contents for a .plist file.
    r8r<r;)rrr>)rr8r<r;r.rrrr
s	)Er6�__all__rSr��
contextlibrdZenum�iorrr��rer��warningsrZxml.parsers.expatrZEnumr!r�globalsr1Z__members__r�rr�contextmanagerr/rrrrrrr��compilerprErB�ASCIIr`rhrjrvrwr�r�r�rrr�r��objectr�r�rr*rcr�r@rrr+rr	r.r
rrr
rrrr�<module>/sv



0		
h&d!	�
�