Your IP : 3.135.208.236


Current Path : /opt/alt/python312/lib64/python3.12/__pycache__/
Upload File :
Current File : //opt/alt/python312/lib64/python3.12/__pycache__/imghdr.cpython-312.opt-2.pyc

�

�Q�f.���	ddlmZddlZdgZejed��dd�ZgZd�Zeje�d�Z
eje
�d	�Zeje�d
�Zeje�d�Z
eje
�d�Zeje�d
�Zeje�d�Zeje�d�Zeje�d�Zeje�d�Zeje�d�Zeje�d�Zeje�d�Zd�Zedk(re�yy)�)�PathLikeN�what)��
)�removec��	d}	|�ft|ttf�rt|d�}|j	d�}n2|j�}|j	d�}|j
|�tD]$}|||�}|s�|c|r|j�SS	|r|j�y#|r|j�wwxYw)N�rb� )	�
isinstance�strr�open�read�tell�seek�tests�close)�file�h�f�location�tf�ress      �-/opt/alt/python312/lib64/python3.12/imghdr.pyrrs���F��A���9��$��h��0���t�$���F�F�2�J���9�9�;���I�I�b�M���	�	�(�#��B��Q��(�C���
��a�g�g�i�1��

�a�g�g�i���
�a�g�g�i�1�s�A<B.�B.�B.�.Cc�(�	|dddvry|dddk(ryy)N��
)sJFIFsExif�jpeg�s��۩�rrs  r�	test_jpegr!+s.��E���2�w�$�$��	
�2�A��%�	%��
&�c�*�	|jd�ryy)Ns�PNG

�png��
startswithr s  r�test_pngr'4s��'��|�|�(�)��*r"c��	|dddvryy)Nr)sGIF87asGIF89a�gifrr s  r�test_gifr*;s��=���!�u�&�&��'r"c��	|dddvryy)N�)sMMsII�tiffrr s  r�	test_tiffr.Bs��Q���!�u����r"c�*�	|jd�ryy)Ns��rgbr%r s  r�test_rgbr1Is��)��|�|�K� ��!r"c�h�	t|�dk\r#|dtd�k(r|ddvr	|ddvryyyyy)	Nrr�P�s14r,� 	

�pbm��len�ordr s  r�test_pbmr:P�H��9�
�1�v��{�	�!���D�	��a��d�e�m��!��
�0B��1C�m��r"c�h�	t|�dk\r#|dtd�k(r|ddvr	|ddvryyyyy)	Nrrr3r4s25r,r5�pgmr7r s  r�test_pgmr>XsH��:�
�1�v��{�	�!���D�	��a��d�e�m��!��
�0B��1C�m��r"c�h�	t|�dk\r#|dtd�k(r|ddvr	|ddvryyyyy)	Nrrr3r4s36r,r5�ppmr7r s  r�test_ppmrA`r;r"c�*�	|jd�ryy)NsY�j��rastr%r s  r�	test_rastrDhs��'��|�|�'�(��)r"c�*�	|jd�ryy)Ns#define �xbmr%r s  r�test_xbmrGos��9��|�|�K� ��!r"c�*�	|jd�ryy)NsBM�bmpr%r s  r�test_bmprJvs��,��|�|�E���r"c�<�	|jd�r
|dddk(ryyy)NsRIFF��sWEBP�webpr%r s  r�	test_webprO}s)��(��|�|�G���1�R��G�!3��"4�r"c�*�	|jd�ryy)Nsv/1�exrr%r s  r�test_exrrR�s��7��|�|�'�(��)r"c�\�ddl}d}|jddr#|jddk(r|jdd�=d}	|jddrt|jdd|d�ytdg|d�y#t$r/|jjd�|j
d�YywxYw)Nrr4z-rr,�.z
[Interrupted]
)�sys�argv�testall�KeyboardInterrupt�stderr�write�exit)rU�	recursives  r�testr]�s�����I�
�x�x���|������t�+��H�H�Q�q�S�M��	���8�8�A�B�<��C�H�H�Q�R�L�)�Q�/��S�E�9�a�(�����
�
���,�-�������s�)A3�$A3�35B+�*B+c��ddl}ddl}|D]�}|jj|�rwt	|dzd��|s|rWt	d�ddl}|j|jj
|j|�d��}t||d���t	d���t	|dzd��|jj�	t	t|����y#t$rt	d	�Y��wxYw)
Nrz/:� )�endzrecursing down:�*z*** directory (use -r) ***�:z*** not found ***)
rU�os�path�isdir�print�glob�join�escaperW�stdout�flushr�OSError)�listr\�toplevelrUrc�filenamerg�namess        rrWrW�s����
���
�7�7�=�=��"��(�T�/�s�+��H��'�(���	�	�"�'�'�,�,�t�{�{�8�/D�c�"J�K����y�!�,��2�3��(�S�.�c�*��J�J����
+��d�8�n�%����
+��)�*�
+�s�C"�"C9�8C9�__main__)N)rcr�warnings�__all__�_deprecated�__name__rrr!�appendr'r*r.r1r:r>rArDrGrJrOrRr]rWrr"r�<module>rwsJ��B����(������X�g�.��2	������Y���
���X���
���X���
���Y���
���X������X������X������X���
���Y���
���X���
���X���
���Y���
���X��
�+�*�z���F�r"

?>