Edit File: binhex.pyc
� ��7ec�����������@���s���d��Z��d�d�l�Z�d�d�l�Z�d�d�l�Z�d�d�l�Z�d�d�d�g�Z�d�e�f�d�������YZ�d�Z�d�Z �d �Z �d �Z�e�d���Z �y<�d�d�l�m�Z�m�Z�d�d �l�m�Z�d����Z�d����Z�Wn@�e�k �r��d�d%�d�������YZ�d����Z�d�d&�d�������YZ�n�Xd�d'�d�������YZ�d�d(�d�������YZ�d�d)�d�������YZ�d����Z�d�d*�d�������YZ�d�d+�d�������YZ�d �d,�d!�������YZ�d"����Z�d#����Z�e�d$�k�r�e����n��d�S(-���s����Macintosh binhex compression/decompression. easy interface: binhex(inputfilename, outputfilename) hexbin(inputfilename, outputfilename) i����Nt���binhext���hexbint���Errorc�����������B���s���e��Z�RS(����(���t���__name__t ���__module__(����(����(����s���/usr/lib64/python2.7/binhex.pyR������s���i����i���i����i@���i����(���t���FSSpect���FInfo(���t���openrfc���������C���s����t��|����j����}�t�j�j�|����\�}�}�t�|��d���}�|�j�d�d���|�j����}�t�|��d���}�|�j�d�d���|�j����}�|�|�|�|�f�S(���Nt���rbi����i���s���*rb( ���R���t���FSpGetFInfot���ost���patht���splitt���opent���seekt���tellR���(���t���namet���finfot���dirt���filet���fpt���dlent���rlen(����(����s���/usr/lib64/python2.7/binhex.pyt���getfileinfo4���s����c���������G���s*���|�s�d�}�n�d�|�d�}�t��|��|���S(���Ns���*rbt���*i����(���R���(���R���t���mode(����(����s���/usr/lib64/python2.7/binhex.pyt���openrsrc@���s���� R���c�����������B���s���e��Z�d�����Z�RS(���c���������C���s���d�|��_��d�|��_�d�|��_�d��S(���Ns���????i����(���t���Typet���Creatort���Flags(���t���self(����(����s���/usr/lib64/python2.7/binhex.pyt���__init__M���s���� (���R���R���R���(����(����(����s���/usr/lib64/python2.7/binhex.pyR���L���s���c���������C���s����t�����}�t�|����}�t�|����j�d���}�xF�|�D]5�}�|�j����r1�|�d�k��sb�t�|���d�k�r1�Pq1�q1�Wd�|�_�|�j�d�d���|�j����}�|�j����t �j �j�|����\�}�}�|�j�d�d�d ���}�|�|�|�d�f�S( ���Ni���t��� i���t���TEXTi����i���t���:t���-i���( ���R���R ���t���readt���isspacet���ordR���R���R���t���closeR ���R���R���t���replace(���R���R���R���t���datat���ct���dsizeR���R���(����(����s���/usr/lib64/python2.7/binhex.pyR���R���s���� + R���c�����������B���s,���e��Z�d�����Z�d����Z�d����Z�d����Z�RS(���c���������G���s���d��S(���N(����(���R���t���args(����(����s���/usr/lib64/python2.7/binhex.pyR���d���s����c���������G���s���d�S(���Nt����(����(���R���R,���(����(����s���/usr/lib64/python2.7/binhex.pyR$���g���s����c���������G���s���d��S(���N(����(���R���R,���(����(����s���/usr/lib64/python2.7/binhex.pyt���writej���s����c���������C���s���d��S(���N(����(���R���(����(����s���/usr/lib64/python2.7/binhex.pyR'���m���s����(���R���R���R���R$���R.���R'���(����(����(����s���/usr/lib64/python2.7/binhex.pyR���c���s��� t���_Hqxcoderenginec�����������B���s2���e��Z�d��Z�d����Z�d����Z�d����Z�d����Z�RS(���s(���Write data to the coder in 3-byte chunksc���������C���s,���|�|��_��d�|��_�d�|��_�t�d�|��_�d��S(���NR-���i���(���t���ofpR)���t���hqxdatat���LINELENt���linelen(���R���R0���(����(����s���/usr/lib64/python2.7/binhex.pyR���s���s���� c���������C���s~���|��j��|�|��_��t�|��j����}�|�d�d�}�|��j��|� }�|��j��|�|��_��|�sT�d��S|��j�t�j�|���|��_�|��j�d���d��S(���Ni���i����(���R)���t���lenR1���t���binasciit���b2a_hqxt���_flush(���R���R)���t���datalent���todo(����(����s���/usr/lib64/python2.7/binhex.pyR.���y���s���� c���������C���s����d�}�xZ�|�t��|��j���|��j�k�rb�|�|��j�}�|��j�j�|��j�|�|�!d���t�|��_�|�}�q �W|��j�|�|��_�|�r��|��j�j�|��j�d���n��d��S(���Ni����s��� s���: (���R4���R1���R3���R0���R.���R2���(���R���t���forcet���firstt���last(����(����s���/usr/lib64/python2.7/binhex.pyR7�������s���� c���������C���sL���|��j��r(�|��j�t�j�|��j����|��_�n��|��j�d���|��j�j����|��`�d��S(���Ni���(���R)���R1���R5���R6���R7���R0���R'���(���R���(����(����s���/usr/lib64/python2.7/binhex.pyR'�������s ���� (���R���R���t���__doc__R���R.���R7���R'���(����(����(����s���/usr/lib64/python2.7/binhex.pyR/���p���s ��� t���_Rlecoderenginec�����������B���s)���e��Z�d��Z�d����Z�d����Z�d����Z�RS(���s4���Write data to the RLE-coder in suitably large chunksc���������C���s���|�|��_��d�|��_�d��S(���NR-���(���R0���R)���(���R���R0���(����(����s���/usr/lib64/python2.7/binhex.pyR�������s���� c���������C���sX���|��j��|�|��_��t�|��j����t�k��r)�d��St�j�|��j����}�|��j�j�|���d�|��_��d��S(���NR-���(���R)���R4���t���REASONABLY_LARGER5���t���rlecode_hqxR0���R.���(���R���R)���t���rledata(����(����s���/usr/lib64/python2.7/binhex.pyR.�������s����c���������C���sE���|��j��r.�t�j�|��j����}�|��j�j�|���n��|��j�j����|��`�d��S(���N(���R)���R5���R@���R0���R.���R'���(���R���RA���(����(����s���/usr/lib64/python2.7/binhex.pyR'�������s ���� (���R���R���R=���R���R.���R'���(����(����(����s���/usr/lib64/python2.7/binhex.pyR>�������s��� t���BinHexc�����������B���sP���e��Z�d�����Z�d����Z�d����Z�d����Z�d����Z�d����Z�d����Z�d����Z �RS(���c��� ������C���s����|�\�}�}�}�}�t��|���t��d���k�rB�|�}�t�|�d���}�n��|�j�d���t�|���}�t�|���|��_�d�|��_�|�d��k�r��t����}�n��|�|��_ �|�|��_ �|��j�|�|���t�|��_ �d��S(���NR-���t���ws0���(This file must be converted with BinHex 4.0) :i����(���t���typeR ���R.���R/���R>���R0���t���crct���NoneR���R���R���t ���_writeinfot���_DID_HEADERt���state( ���R���t���name_finfo_dlen_rlenR0���R���R���R���R���t���ofnamet���hqxer(����(����s���/usr/lib64/python2.7/binhex.pyR�������s���� c��� ������C���s����t��|���}�|�d�k�r$�t�d���n��t�|���|�d�}�|�j�|�j�}�t�j�d�|�j���}�t�j�d�|��j�|��j ���}�|�|�|�|�}�|��j �|���|��j����d��S(���Ni?���s���Filename too longs����s���>hs���>ii(���R4���R���t���chrR���R���t���structt���packR���R���R���t���_writet ���_writecrc( ���R���R���R���t���nlt���dt���d2t���d3t���d4t���info(����(����s���/usr/lib64/python2.7/binhex.pyRG�������s���� c���������C���s,���t��j�|�|��j���|��_�|��j�j�|���d��S(���N(���R5���t���crc_hqxRE���R0���R.���(���R���R)���(����(����s���/usr/lib64/python2.7/binhex.pyRP�������s����c���������C���sJ���|��j��d�k��r�d�}�n�d�}�|��j�j�t�j�|�|��j������d�|��_��d��S(���Ni����s���>hs���>H(���RE���R0���R.���RN���RO���(���R���t���fmt(����(����s���/usr/lib64/python2.7/binhex.pyRQ�������s ���� c���������C���sB���|��j��t�k�r�t�d���n��|��j�t�|���|��_�|��j�|���d��S(���Ns���Writing data at the wrong time(���RI���RH���R���R���R4���RP���(���R���R)���(����(����s���/usr/lib64/python2.7/binhex.pyR.�������s����c���������C���s<���|��j��d�k�r%�t�d�|��j�f���n��|��j����t�|��_�d��S(���Ni����s���Incorrect data size, diff=%r(���R���R���R���RQ���t ���_DID_DATARI���(���R���(����(����s���/usr/lib64/python2.7/binhex.pyt ���close_data����s���� c���������C���s^���|��j��t�k��r�|��j����n��|��j��t�k�r7�t�d���n��|��j�t�|���|��_�|��j�|���d��S(���Ns'���Writing resource data at the wrong time(���RI���RZ���R[���R���R���R4���RP���(���R���R)���(����(����s���/usr/lib64/python2.7/binhex.pyt ���write_rsrc����s���� c���������C���s����|��j��d��k�r�d��Szj�|��j��t�k��r2�|��j����n��|��j��t�k�rM�t�d���n��|��j�d�k�rr�t�d�|��j�f���n��|��j����Wd��d��|��_��|��j�}�|��`�|�j����Xd��S(���Ns���Close at the wrong timei����s$���Incorrect resource-datasize, diff=%r( ���RI���RF���RZ���R[���R���R���RQ���R0���R'���(���R���R0���(����(����s���/usr/lib64/python2.7/binhex.pyR'�������s���� ( ���R���R���R���RG���RP���RQ���R.���R[���R\���R'���(����(����(����s���/usr/lib64/python2.7/binhex.pyRB�������s��� c���������C���s����t��|����}�t�|�|���}�t�|��d���}�x*�|�j�d���}�|�sF�Pn��|�j�|���q-�W|�j����|�j����t�|��d���}�x*�|�j�d���}�|�s��Pn��|�j�|���q}�W|�j����|�j����d�S(���s@���(infilename, outfilename) - Create binhex-encoded copy of a fileR���i���N( ���R���RB���R ���R$���R.���R[���R'���R���R\���(���t���inpt���outR���R0���t���ifpRS���(����(����s���/usr/lib64/python2.7/binhex.pyR�������s$����� � t���_Hqxdecoderenginec�����������B���s)���e��Z�d��Z�d����Z�d����Z�d����Z�RS(���s*���Read data via the decoder in 4-byte chunksc���������C���s���|�|��_��d�|��_�d��S(���Ni����(���R_���t���eof(���R���R_���(����(����s���/usr/lib64/python2.7/binhex.pyR�����s���� c���������C���s����d�}�|�}�x��|�d�k�r��|��j��r(�|�S|�d�d�d�}�|��j�j�|���}�xf�y�t�j�|���\�}�|��_��PWn�t�j�k �r��n�X|��j�j�d���}�|�s��t�d���n��|�|�}�qO�W|�|�}�|�t�|���}�|�r�|��j��r�t�d���q�q�W|�S(���s&���Read at least wtd bytes (or until EOF)R-���i����i���i���i���i���s���Premature EOF on binhex file(���Ra���R_���R$���R5���t���a2b_hqxt ���IncompleteR���R4���(���R���t���totalwtdt���decdatat���wtdR)���t ���decdatacurt���newdata(����(����s���/usr/lib64/python2.7/binhex.pyR$�����s.���� � c���������C���s���|��j��j����d��S(���N(���R_���R'���(���R���(����(����s���/usr/lib64/python2.7/binhex.pyR'���?��s����(���R���R���R=���R���R$���R'���(����(����(����s���/usr/lib64/python2.7/binhex.pyR`�����s��� "t���_Rledecoderenginec�����������B���s2���e��Z�d��Z�d����Z�d����Z�d����Z�d����Z�RS(���s���Read data via the RLE-coderc���������C���s(���|�|��_��d�|��_�d�|��_�d�|��_�d��S(���NR-���i����(���R_���t ���pre_buffert���post_bufferRa���(���R���R_���(����(����s���/usr/lib64/python2.7/binhex.pyR���E��s���� c���������C���sS���|�t��|��j���k�r2�|��j�|�t��|��j�����n��|��j�|� }�|��j�|�|��_�|�S(���N(���R4���Rk���t���_fill(���R���Rf���t���rv(����(����s���/usr/lib64/python2.7/binhex.pyR$���K��s ���� c���������C���s$��|��j��|��j�j�|�d���|��_��|��j�j�rU�|��j�t�j�|��j����|��_�d�|��_��d��St�|��j����}�|��j��d�t�d�t�k�r��|�d�}�nd�|��j��d�t�k�r��|�d�}�nD�|��j��d�t�d�k�r��|�d�}�n �|��j��d�t�k�r��n �|�d �}�|��j�t�j�|��j��|� ��|��_�|��j��|�|��_��d��S( ���Ni���R-���i����s����i���i����i���i����i���( ���Rj���R_���R$���Ra���Rk���R5���t ���rledecode_hqxR4���t���RUNCHAR(���R���Rf���t���mark(����(����s���/usr/lib64/python2.7/binhex.pyRl���R��s&���� c���������C���s���|��j��j����d��S(���N(���R_���R'���(���R���(����(����s���/usr/lib64/python2.7/binhex.pyR'���u��s����(���R���R���R=���R���R$���Rl���R'���(����(����(����s���/usr/lib64/python2.7/binhex.pyRi���B��s ��� #t���HexBinc�����������B���sP���e��Z�d�����Z�d����Z�d����Z�d����Z�d����Z�d����Z�d����Z�d����Z �RS(���c���������C���s����t��|���t��d���k�r'�t�|���}�n��xb�|�j�d���}�|�sK�t�d���n��|�d�k�r]�q*�n��|�d�k�rm�Pn��|�d�k�r*�|�j����}�q*�q*�Wt�|���}�t�|���|��_�d�|��_�|��j ����d��S(���NR-���i���s���No binhex data founds��� R"���s��� i����( ���RD���R ���R$���R���t���readlineR`���Ri���R_���RE���t���_readheader(���R���R_���t���cht���dummyt���hqxifp(����(����s���/usr/lib64/python2.7/binhex.pyR���y��s ���� c���������C���s.���|��j��j�|���}�t�j�|�|��j���|��_�|�S(���N(���R_���R$���R5���RX���RE���(���R���R4���R)���(����(����s���/usr/lib64/python2.7/binhex.pyt���_read���s����c���������C���sk���t��j�d�|��j�j�d�����d�d�@}�|��j�d�@|��_�|�|��j�k�r^�t�d�|��j�|�f���n��d�|��_�d��S(���Ns���>hi���i����i����s���CRC error, computed %x, read %x(���RN���t���unpackR_���R$���RE���R���(���R���t���filecrc(����(����s���/usr/lib64/python2.7/binhex.pyt ���_checkcrc���s����&c���������C���s����|��j��d���}�|��j��t�|�����}�|��j��d���}�|��j����|�d�d�!}�|�d�d�!}�t�j�d�|�d�d�!��d�}�t�j�d �|�d�d �!��d�|��_�t�j�d �|�d �d�!��d�|��_�|�|��_�t����|��_�|�|��j�_ �|�|��j�_ �|�|��j�_�t�|��_ �d��S(���Ni���i���i���i���i ���s���>hi���i����s���>li���i���i���i ���i���i���i���(���Rw���R&���Rz���RN���Rx���R���R���t���FNameR���R���R���R���RH���RI���(���R���R4���t���fnamet���restRD���t���creatort���flags(����(����s���/usr/lib64/python2.7/binhex.pyRs������s���� c���������G���s����|��j��t�k�r�t�d���n��|�r@�|�d�}�t�|�|��j���}�n �|��j�}�d�}�x3�t�|���|�k��r��|�|��j�|�t�|�����}�qR�W|��j�|�|��_�|�S(���Ns���Read data at wrong timei����R-���(���RI���RH���R���t���minR���R4���Rw���(���R���t���nRm���(����(����s���/usr/lib64/python2.7/binhex.pyR$������s���� !c���������C���sP���|��j��t�k�r�t�d���n��|��j�r9�|��j�|��j���}�n��|��j����t�|��_��d��S(���Ns���close_data at wrong time(���RI���RH���R���R���Rw���Rz���RZ���(���R���Ru���(����(����s���/usr/lib64/python2.7/binhex.pyR[������s���� c���������G���s����|��j��t�k�r�|��j����n��|��j��t�k�r7�t�d���n��|�r\�|�d�}�t�|�|��j���}�n �|��j�}�|��j�|�|��_�|��j�|���S(���Ns ���Read resource data at wrong timei����(���RI���RH���R[���RZ���R���R����R���Rw���(���R���R����(����(����s���/usr/lib64/python2.7/binhex.pyt ���read_rsrc���s���� c���������C���s]���|��j��d��k�r�d��Sz,�|��j�r4�|��j�|��j���}�n��|��j����Wd��d��|��_��|��j�j����Xd��S(���N(���RI���RF���R���R����Rz���R_���R'���(���R���Ru���(����(����s���/usr/lib64/python2.7/binhex.pyR'������s���� ( ���R���R���R���Rw���Rz���Rs���R$���R[���R����R'���(����(����(����s���/usr/lib64/python2.7/binhex.pyRq���x��s��� c���������C���s����t��|����}�|�j�}�|�s'�|�j�}�n��t�|�d���}�x*�|�j�d���}�|�sR�Pn��|�j�|���q9�W|�j����|�j����|�j�d���}�|�r��t �|�d���}�|�j�|���x*�|�j�d���}�|�s��Pn��|�j�|���q��W|�j����n��|�j����d�S(���s0���(infilename, outfilename) - Decode binhexed filet���wbi���N( ���Rq���R���R{���R ���R$���R.���R'���R[���R����R���(���R]���R^���R_���R���R0���RS���(����(����s���/usr/lib64/python2.7/binhex.pyR������s.���� � � c����������C���sD���t��j�d�}��t�|��|��d���t�|��d�|��d���t��j�d���d��S(���Ni���s���.hqxs���.viahqx(���t���syst���argvR����R���t���exit(���R|���(����(����s���/usr/lib64/python2.7/binhex.pyt���_test���s���� t���__main__(����(����(����(����(����(����(����(����( ���R=���R����R ���RN���R5���t���__all__t ���ExceptionR���RH���RZ���R?���R2���RM���Ro���t���Carbon.FileR���R���t���MacOSR���R���R���t���ImportErrorR/���R>���RB���R����R`���Ri���Rq���R���R����R���(����(����(����s���/usr/lib64/python2.7/binhex.pyt���<module>���s>��� 'S ,6j