Your IP : 3.133.127.131


Current Path : /opt/alt/python38/lib64/python3.8/__pycache__/
Upload File :
Current File : //opt/alt/python38/lib64/python3.8/__pycache__/imghdr.cpython-38.opt-2.pyc

U

i�f��@s.ddlmZdgZd$dd�ZgZdd�Ze�e�dd�Ze�e�d	d
�Ze�e�dd�Z	e�e	�d
d�Z
e�e
�dd�Ze�e�dd�Ze�e�dd�Z
e�e
�dd�Ze�e�dd�Ze�e�dd�Ze�e�dd�Ze�e�dd�Ze�e�dd �Zd!d"�Zed#k�r*e�dS)%�)�PathLike�whatNcCs�d}zp|dkrNt|ttf�r2t|d�}|�d�}n|��}|�d�}|�|�tD]}|||�}|rR|W�SqRW5|r�|��XdS)N�rb� )	�close�
isinstance�strr�open�read�tell�seek�tests)�file�h�f�locationZtf�res�r�+/opt/alt/python38/lib64/python3.8/imghdr.pyrs 




cCs|dd�dkrdSdS)N��
)sJFIFsExifZjpegr�rrrrr�	test_jpeg%srcCs|�d�rdSdS)Ns�PNG

Zpng��
startswithrrrr�test_png,s
rcCs|dd�dkrdSdS)Nr)sGIF87asGIF89aZgifrrrrr�test_gif2srcCs|dd�dkrdSdS)N�)sMMsIIZtiffrrrrr�	test_tiff9srcCs|�d�rdSdS)Ns�Zrgbrrrrr�test_rgb@s
rcCs<t|�dkr8|dtd�kr8|ddkr8|ddkr8dSdS)	N�r�P�s14r� 	

Zpbm��len�ordrrrr�test_pbmGs�
�
�r'cCs<t|�dkr8|dtd�kr8|ddkr8|ddkr8dSdS)	Nr rr!r"s25rr#Zpgmr$rrrr�test_pgmOs�
�
�r(cCs<t|�dkr8|dtd�kr8|ddkr8|ddkr8dSdS)	Nr rr!r"s36rr#Zppmr$rrrr�test_ppmWs�
�
�r)cCs|�d�rdSdS)NsY�j�Zrastrrrrr�	test_rast_s
r*cCs|�d�rdSdS)Ns#define Zxbmrrrrr�test_xbmfs
r+cCs|�d�rdSdS)NsBMZbmprrrrr�test_bmpms
r,cCs"|�d�r|dd�dkrdSdS)NsRIFF��sWEBPZwebprrrrr�	test_webpssr/cCs|�d�rdSdS)Nsv/1Zexrrrrrr�test_exrys
r0cCs�ddl}d}|jdd�r8|jddkr8|jdd�=d}z8|jdd�r`t|jdd�|d�ntdg|d�Wn*tk
r�|j�d�|�d�YnXdS)Nrr"z-rr�.z
[Interrupted]
)�sys�argv�testall�KeyboardInterrupt�stderr�write�exit)r2�	recursiverrr�test�sr:c	Cs�ddl}ddl}|D]�}|j�|�r~t|ddd�|s<|rttd�ddl}|�|j�|�|�d��}t||d�q�td�qt|ddd�|j	�
�ztt|��Wqtk
r�td	�YqXqdS)
Nrz/:� )�endzrecursing down:�*z*** directory (use -r) ***�:z*** not found ***)
r2�os�path�isdir�print�glob�join�escaper4�stdout�flushr�OSError)�listr9Ztoplevelr2r?�filenamerC�namesrrrr4�s"

r4�__main__)N)r?r�__all__rr
r�appendrrrrr'r(r)r*r+r,r/r0r:r4�__name__rrrr�<module>sB
















?>