uawdijnntqw1x1x1
IP : 3.15.225.188
Hostname : host45.registrar-servers.com
Kernel : Linux host45.registrar-servers.com 4.18.0-513.18.1.lve.2.el8.x86_64 #1 SMP Sat Mar 30 15:36:11 UTC 2024 x86_64
Disable Function : None :)
OS : Linux
PATH:
/
home
/
..
/
lib64
/
ImageMagick-6.9.13
/
..
/
.
/
python3.6
/
__pycache__
/
plistlib.cpython-36.opt-2.pyc
/
/
3 �Qg#~�@s^dddddddddd d ddd gZddlZddlZddlZddlZddlZddlmZddlZddl Z ddl Z ddlZddlm Z ddlmZejdded�Ze�jej�Gdd�de�ZGdd�de�Zejdd��ZGdd�de�Zdd�Zdd�Zdd�Zdd�ZGd d�d�Z d!Z!e j"d"�Z#dOd$d%�Z$d&d'�Z%e j"d(e j&�Z'd)d*�Z(d+d,�Z)d-d.�Z*Gd/d0�d0�Z+Gd1d2�d2�Z,Gd3d4�d4e,�Z-d5d6�Z.Gd7d�de/�Z0d8d9d:d;d<�Z1e2�Z3Gd=d>�d>�Z4d?d@�Z5e6e7e8eje9fZ:GdAdB�dBe2�Z;dCdD�Z<e=ee.e+e-dE�e>ee<e4e;dE�iZ?ddFedG�dHd �Z@ddFedG�dId�ZAe=dFdJdK�dLd�ZBe=dJdFdM�dNd �ZCdS)P� readPlist� writePlist�readPlistFromBytes�writePlistToBytes�Plist�Data�Dict�InvalidFileException�FMT_XML� FMT_BINARY�load�dump�loads�dumps�N)�BytesIO)�warn)�ParserCreate�PlistFormatzFMT_XML FMT_BINARY)�modulec@s(eZdZfZdd�Zdd�Zdd�ZdS)� _InternalDictcCs:y||}Wntk r(t|��YnXtdtd�|S)NzLAttribute access from plist dicts is deprecated, use d[key] notation instead�)�KeyError�AttributeErrorr�DeprecationWarning)�self�attr�value�r� /usr/lib64/python3.6/plistlib.py�__getattr__Vsz_InternalDict.__getattr__cCstdtd�|||<dS)NzLAttribute access from plist dicts is deprecated, use d[key] notation insteadr)rr)rrrrrr�__setattr___sz_InternalDict.__setattr__cCs8y ||=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__rr r!rrrrrOs rcseZdZ�fdd�Z�ZS)rcstdtd�t�jf|�dS)Nz?The plistlib.Dict class is deprecated, use builtin dict insteadr)rr�super�__init__)r�kwargs)� __class__rrr'osz Dict.__init__)r"r#r$r'� __classcell__rr)r)rrmsc cs2t|t�r(t||��}|VWdQRXn|VdS)N)� isinstance�str�open)� pathOrFile�mode�fprrr�_maybe_openus r1cs0eZdZ�fdd�Zedd��Zdd�Z�ZS)rcstdtd�t�jf|�dS)NzJThe Plist class is deprecated, use the load() and dump() functions insteadr)rrr&r')rr()r)rrr'�szPlist.__init__c Cs2t|d��}t|�}WdQRX|�}|j|�|S)N�rb)r1r�update)�clsr.r0rZplistrrr�fromFile�s zPlist.fromFilec Cs$t|d��}t||�WdQRXdS)N�wb)r1r)rr.r0rrr�write�szPlist.write)r"r#r$r'�classmethodr5r7r*rr)r)rrs c Cs2tdtd�t|d��}t|ddtd�SQRXdS)Nz8The readPlist function is deprecated, use load() insteadrr2F)�fmt�use_builtin_types� dict_type)rrr1rr)r.r0rrrr�s cCs8tdtd�t|d��}t||tddd�WdQRXdS)Nz9The writePlist function is deprecated, use dump() insteadrr6TF)r9� sort_keys�skipkeys)rrr1rr )rr.r0rrrr�scCs tdtd�tt|�ddtd�S)NzBThe readPlistFromBytes function is deprecated, use loads() insteadrF)r9r:r;)rrrrr)�datarrrr�scCs,tdtd�t�}t||tddd�|j�S)NzAThe writePlistToBytes function is deprecated, use dumps() insteadrTF)r9r<r=)rrrrr �getvalue)r�frrrr�s c@s:eZdZdd�Zedd��Zd dd�Zdd �Zd d�ZdS)rcCst|t�std��||_dS)Nzdata must be as bytes)r+�bytes� TypeErrorr>)rr>rrrr'�s z Data.__init__cCs|t|��S)N)�_decode_base64)r4r>rrr� fromBase64�szData.fromBase64�LcCst|j|�S)N)�_encode_base64r>)r� maxlinelengthrrr�asBase64�sz Data.asBase64cCs4t||j�r|j|jkSt|t�r,|j|kStSdS)N)r+r)r>rA�NotImplemented)r�otherrrr�__eq__�s zData.__eq__cCsd|jjt|j�fS)Nz%s(%s))r)r"�reprr>)rrrr�__repr__�sz Data.__repr__N)rE) r"r#r$r'r8rDrHrKrMrrrrr�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]rEcCsT|dd}g}x8tdt|�|�D]$}||||�}|jtj|��q"Wdj|�S)N��r�)�range�len�append�binasciiZ b2a_base64�join)�srGZ maxbinsize�pieces�i�chunkrrrrFsrFcCs(t|t�rtj|jd��Stj|�SdS)Nzutf-8)r+r,rTZ a2b_base64�encode)rVrrrrC s rCz{(?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))?)?)?)?)?ZcCsNd}tj|�j�}g}x,|D]$}||}|dkr2P|jt|��qWtj|�S)N�year�month�day�hour�minute�second)r[r\r]r^r_r`)�_dateParser�match� groupdictrS�int�datetime)rV�orderZgdZlst�key�valrrr�_date_from_strings ricCs d|j|j|j|j|j|jfS)Nz%04d-%02d-%02dT%02d:%02d:%02dZ)r[r\r]r^r_r`)�drrr�_date_to_string&srkcCsZtj|�}|dk rtd��|jdd�}|jdd�}|jdd�}|jdd�}|jd d �}|S)Nz<strings can't contains control characters; use bytes insteadz � � �&z&�<z<�>z>)�_controlCharPat�search� ValueError�replace)�text�mrrr�_escape,s rwc@s�eZdZdd�Zdd�Zdd�Zdd�Zd d �Zdd�Zd d�Z dd�Z dd�Zdd�Zdd�Z dd�Zdd�Zdd�Zdd�Zdd �Zd!d"�Zd#d$�Zd%d&�Zd'S)(�_PlistParsercCs"g|_d|_d|_||_||_dS)N)�stack�current_key�root�_use_builtin_types� _dict_type)rr:r;rrrr'9s z_PlistParser.__init__cCs8t�|_|j|j_|j|j_|j|j_|jj|�|j S)N) r�parser�handle_begin_elementZStartElementHandler�handle_end_elementZEndElementHandler�handle_dataZCharacterDataHandlerZ ParseFiler{)rZfileobjrrr�parse@s z_PlistParser.parsecCs*g|_t|d|d�}|dk r&||�dS)NZbegin_)r>�getattr)r�element�attrs�handlerrrrrHsz!_PlistParser.handle_begin_elementcCs"t|d|d�}|dk r|�dS)NZend_)r�)rr�r�rrrr�Nsz_PlistParser.handle_end_elementcCs|jj|�dS)N)r>rS)rr>rrrr�Ssz_PlistParser.handle_datacCs�|jdk rFt|jdti��s.td|jj��||jd|j<d|_nB|jsT||_n4t|jdtg��sxtd|jj��|jdj|�dS)N�zunexpected element at line %d���r�r�r�) rzr+ry�typersr~�CurrentLineNumberr{rS)rrrrr� add_objectVs z_PlistParser.add_objectcCsdj|j�}g|_|S)N�)rUr>)rr>rrr�get_datafsz_PlistParser.get_datacCs"|j�}|j|�|jj|�dS)N)r}r�ryrS)rr�rjrrr� begin_dictms z_PlistParser.begin_dictcCs*|jrtd|j|jjf��|jj�dS)Nz%missing value for key '%s' at line %d)rzrsr~r�ry�pop)rrrr�end_dictrsz_PlistParser.end_dictcCs:|jst|jdti��r,td|jj��|j�|_dS)Nr�zunexpected key at line %dr�)rzr+ryr�rsr~r�r�)rrrr�end_keyxsz_PlistParser.end_keycCsg}|j|�|jj|�dS)N)r�ryrS)rr��arrr�begin_array~s z_PlistParser.begin_arraycCs|jj�dS)N)ryr�)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�rdr�)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_stringcCs2|jr|jt|j���n|jtj|j���dS)N)r|r�rCr�rrD)rrrr�end_data�sz_PlistParser.end_datacCs|jt|j���dS)N)r�rir�)rrrr�end_date�sz_PlistParser.end_dateN)r"r#r$r'r�rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrx8s&rxc@s8eZdZddd�Zdd�Zdd�Zdd d�Zdd �Zd S)�_DumbXMLWriterr� cCs||_g|_||_||_dS)N)�filery� _indent_level�indent)rr��indent_levelr�rrrr'�sz_DumbXMLWriter.__init__cCs,|jj|�|jd|�|jd7_dS)Nz<%s>r�)ryrS�writelnr�)rr�rrr� begin_element�sz_DumbXMLWriter.begin_elementcCs |jd8_|jd|�dS)Nr�z</%s>)r�r�)rr�rrr�end_element�sz_DumbXMLWriter.end_elementNcCs8|dk r&t|�}|jd|||f�n|jd|�dS)Nz<%s>%s</%s>z<%s/>)rwr�)rr�rrrr�simple_element�sz_DumbXMLWriter.simple_elementcCsH|r8t|t�r|jd�}|jj|j|j�|jj|�|jjd�dS)Nzutf-8� )r+r,rZr�r7r�r�)r�linerrrr��s z_DumbXMLWriter.writeln)rr�)N)r"r#r$r'r�r�r�r�rrrrr��s r�c@sFeZdZddd�Zdd �Zd d�Zdd �Zdd�Zdd�Zdd�Z dS)�_PlistWriterr� r�TFcCs.|r|jt�tj||||�||_||_dS)N)r7�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)rrrrrr7�s z_PlistWriter.writecCs4t|t�r|jd|��n|dkr0|jd��n|dkrD|jd�n�t|t�r�d|ko`dknrx|jd d |�nt|��n�t|t�r�|jdt|��n�t|t�r�|j|�n|t|t �r�|j |�nft|ttf�r�|j |�nLt|tj��r|jdt|��n,t|ttf��r |j|�ntd t|���dS)N�stringT�trueFZfalser��?�@Zintegerz%d�realZdatezunsupported type: %sr�l����l)r+r,r�rd� OverflowErrorr�rL�dict� write_dictr� write_datarA� bytearray�write_bytesrerk�tuple�list�write_arrayrBr�)rrrrrr��s. z_PlistWriter.write_valuecCs|j|j�dS)N)r�r>)rr>rrrr��sz_PlistWriter.write_datacCs~|jd�|jd8_tddt|jjdd �|j��}x&t||�jd�D]}|rL|j|�qLW|jd7_|j d�dS) Nr>r��rEr�� �r�s ) r�r��maxrRr�rtrF�splitr�r�)rr>rGr�rrrr��s z_PlistWriter.write_bytescCs�|rx|jd�|jr"t|j��}n|j�}x@|D]8\}}t|t�sR|jrJq0td��|jd|�|j |�q0W|j d�n |jd�dS)Nr�zkeys must be stringsrg)r�r��sorted�itemsr+r,r�rBr�r�r�)rrjr�rgrrrrr�s z_PlistWriter.write_dictcCs@|r2|jd�x|D]}|j|�qW|jd�n |jd�dS)N�array)r�r�r�r�)rr�rrrrr�s z_PlistWriter.write_arrayN)rr�r�TF) r"r#r$r'r7r�r�r�r�r�rrrrr��s % r�cCs�d }x|D]}|j|�r dSq WxntjdftjdftjdffD]N\}}|j|�sRq>x8|D]0}||jd�j|�}|dt|��|krXdSqXWq>WdS) N�<?xml�<plistTzutf-8z utf-16-bez utf-16-le�asciiF)r�r�)� startswith�codecs�BOM_UTF8�BOM_UTF16_BE�BOM_UTF16_LE�decoderZrR)�header�prefixesZpfxZbom�encoding�start�prefixrrr�_is_fmt_xml*s r�c@seZdZddd�ZdS)r�Invalid filecCstj||�dS)N)rsr')r�messagerrrr'LszInvalidFileException.__init__N)r�)r"r#r$r'rrrrrKs�B�H�L�Q)r�rrNr�c@s<eZdZdd�Zdd�Zdd�Zdd�Zd d �Zdd�Zd S)�_BinaryPlistParsercCs||_||_dS)N)r|r})rr:r;rrrr'[sz_BinaryPlistParser.__init__cCs�y|||_|jjdtj�|jjd�}t|�dkr6t��tjd|�\}|_ }}}|jj|�|j ||�|_tg||_ |j|�Stttjttfk r�t��YnXdS)N� z>6xBBQQQi��)�_fp�seek�os�SEEK_END�readrRr�struct�unpack� _ref_size� _read_ints�_object_offsets� _undefined�_objects�_read_object�OSError� IndexError�errorr�rs)rr0�trailer�offset_size�num_objects� top_object�offset_table_offsetrrrr�_s z_BinaryPlistParser.parsecCsL|dkrH|jjd�dd@}d|>}dt|}tj||jj|��dS|S)N�r�rrOrp)r�r��_BINARY_FORMATr�r�)r�tokenLrvrVr@rrr� _get_sizexsz_BinaryPlistParser._get_sizecsv|jj�|���tkr2tjd|�t�����S�sHt���|krNt��t��fdd�td�|��D��SdS)Nrpc3s&|]}tj�||��d�VqdS)�bigN)rd� from_bytes)�.0rX)r>�sizerr� <genexpr>�sz0_BinaryPlistParser._read_ints.<locals>.<genexpr>r) r�r�r�r�r�rRrr�rQ)r�nr�r)r>r�rr��sz_BinaryPlistParser._read_intscCs|j||j�S)N)r�r�)rr�rrr� _read_refs�sz_BinaryPlistParser._read_refscs��j|}|tk r|S�j|}�jj|��jjd�d}|d@|d@}}|dkr^d}�n�|dkrnd}�n||dkr~d}�nl|dkr�d }�n\|d kr�tj�jjd|>�d|dkd �}�n0|dkr�tj d�jjd��d}�n|dk�rtj d�jjd��d}�n�|dk�rDtj d�jjd��d}t j ddd�t j|d�}�n�|dk�r��j|�}�jj|�}t |�|k�rxt���j�s�t|�}�n^|dk�rΈj|�}�jj|�} t | �|k�r�t��| jd�}�n|dk�r�j|�d}�jj|�} t | �|k�rt��| jd�}n�|dk�rX�j|�}�j|�} g}|�j|<|j�fdd�| D��n�|dk�r�j|�}�j|�}�j|�} �j�}|�j|<y2x,t|| �D]\}} �j| �|�j|�<�q�WWntk �r�t��YnXnt��|�j|<|S) Nr�r��r�r�F� TrPr�r�rO)�signed�"z>frN�#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�rdr�r�r�reZ timedeltar�rRrr|rr�r��extendr}�zipr�rB)r�ref�result�offset�tokenZtokenHr�r@rVr>Zobj_refsZkey_refs�k�or)rrr��s� z_BinaryPlistParser._read_objectN) r"r#r$r'r�r�r�r�r�rrrrr�Ss r�cCs0|dkrdS|dkrdS|d>d>r(dSdSdS) Nr�r�r�rr�rN�ir)�countrrr�_count_to_size�src@s<eZdZdd�Zdd�Zdd�Zdd�Zd d �Zdd�Zd S)�_BinaryPlistWritercCs||_||_||_dS)N)r�r�r�)rr0r<r=rrrr'sz_BinaryPlistWriter.__init__c Cs�g|_i|_i|_|j|�t|j�}dg||_t|�|_t|j|_ |j jd�x|jD]}|j|�q\W|j |�}|j j�}t|�}dt||}|j jtj|f|j���d}|||j|||f} |j jtjd| ���dS)Nrsbplist00rp� >5xBBBQQQ)r)�_objlist� _objtable�_objidtable�_flattenrRr�rr�r��_ref_formatr�r7� _write_object� _getrefnum�tellr��pack) rrr��objr�r�r�Z offset_formatZsort_versionr�rrrr7 s( z_BinaryPlistWriter.writec Cs~t|t�r"t|�|f|jkrZdSn8t|t�rHt|j�|jf|jkrZdSnt|�|jkrZdSt|j �}|j j |�t|t�r�||jt|�|f<n0t|t�r�||jt|j�|jf<n||jt|�<t|t��rPg}g}|j�}|j r�t|�}xB|D]:\}}t|t��s|j�rq�td��|j |�|j |�q�WxLtj||�D]}|j|��q:Wn*t|ttf��rzx|D]}|j|��qfWdS)Nzkeys must be strings)r+�_scalarsr�rrr>�idrrRrrSr�r�r�r�r,r�rB� itertools�chainrr�r�) rrZrefnum�keys�valuesr�r �vrrrrr7sB z_BinaryPlistWriter._flattencCsNt|t�r|jt|�|fSt|t�r<|jt|j�|jfS|jt|�SdS)N)r+rrr�rr>rr)rrrrrrgs z_BinaryPlistWriter._getrefnumcCs�|dkr"|jjtjd||B��n�|dkrH|jjtjd|dBd|��nh|dkrn|jjtjd|dBd|��nB|dkr�|jjtjd |dBd|��n|jjtjd|dBd |��dS)Nr�z>Br�r�z>BBBr�z>BBH�r�z>BBL�z>BBQ�ril)r�r7r�r)rrr�rrr�_write_sizeosz_BinaryPlistWriter._write_sizecs��j|�}�jj��j|<|dkr2�jjd��n�|dkrJ�jjd��n�|dkrb�jjd��n�t|t��rl|dkr�y�jjtjdd|��Wn tj k r�t |�d�YnXn�|d'krԈjjtjdd|��n�|d(kr�jjtjd d|��nt|d)k�r�jjtjdd|��nR|d*k�r8�jjtjdd|��n0|d+k�r`�jjd|jdddd��nt |���nxt|t��r��jjtjdd|���nRt|t j ��r�|t j dd d �j�}�jjtjdd|���nt|t��r�jdt|j���jj|j��n�t|ttf��r0�jdt|���jj|��n�t|t��r�y|jd�}�jdt|��Wn4tk �r�|jd�}�jdt|�d �YnX�jj|��nDt|ttf��r��fd!d"�|D�}t|�}�jd#|��jjtjd$�j|f|���n�t|t��r�gg}}�j�r&t|j��} n|j�} xR| D]J\} }t| t��s\�j�rT�q4t d%��|j!�j| ��|j!�j|���q4Wt|�}�jd&|��jjtjd$�j|f|����jjtjd$�j|f|���nt |��dS),N�F�Tr�rz>Bqr'r�r�z>BBr�z>BHr%r�z>BLr&r�z>BQr��r�)r�z>Bdri�rr�rzutf-16berrcsg|]}�j|��qSr)r)r�r)rrr� <listcomp>�sz4_BinaryPlistWriter._write_object.<locals>.<listcomp>rrpzkeys must be stringsrrilll)"rr�rr�r7r+rdr�rr�r��to_bytesr�reZ total_secondsrr(rRr>rAr�r,rZ�UnicodeEncodeErrorr�r�rr�r�r�r�r�rBrS)rrr r@�tZrefsrVZkeyRefsZvalRefsZ rootItemsr r$r)rrrs� $ "$z _BinaryPlistWriter._write_objectN) r"r#r$r'r7rrr(rrrrrrs-0rcCs|dd�dkS)Nr�sbplist00r)r�rrr�_is_fmt_binary�sr0)�detectr~�writerT)r9r:r;cCsn|dkrL|jd�}|jd�x:tj�D]}|d|�r&|d}Pq&Wt��nt|d}|||d�}|j|�S)Nr�rr1r~)r:r;)r�r��_FORMATSr#rr�)r0r9r:r;r��info�P�prrrr�s cCst|�}t||||d�S)N)r9r:r;)rr)rr9r:r;r0rrrr sF)r9r<r=cCs:|tkrtd|f��t|d|||d�}|j|�dS)NzUnsupported format: %rr2)r<r=)r3rsr7)rr0r9r<r=r2rrrrs)r9r=r<cCs t�}t|||||d�|j�S)N)r9r=r<)rrr?)rr9r=r<r0rrrrs)rE)D�__all__rTr�� contextlibre�enum�iorr r��rer��warningsrZxml.parsers.expatr�Enumr"r�globalsr3�__members__r�rr�contextmanagerr1rrrrrrr��compilerqrFrC�ASCIIrarirkrwrxr�r�r�rsrr��objectr�r�rr,rdr�rArrr0r r r3rr rrrrrr�<module>1sx 0 h&d!# S
/home/../lib64/ImageMagick-6.9.13/.././python3.6/__pycache__/plistlib.cpython-36.opt-2.pyc