| Server IP : 146.190.157.162 / Your IP : 216.73.217.127 Web Server : Apache System : Linux ubuntu-s-2vcpu-4gb-amd-sfo3-01-KIT-DIGITAL 6.5.0-44-generic #44-Ubuntu SMP PREEMPT_DYNAMIC Fri Jun 7 15:10:09 UTC 2024 x86_64 User : businessweek ( 639) PHP Version : 8.2.10-2ubuntu2.2 Disable Function : exec,passthru,shell_exec,system,proc_open,popen,pcntl_exec,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_signal,pcntl_signal_dispatch,pcntl_getpriority,pcntl_setpriority,dl,putenv,parse_ini_file,show_source MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /usr/lib/python3/dist-packages/PIL/__pycache__/ |
Upload File : |
�
D#�dC � �( � d dl Z G d� d� � ZdS )� Nc �L � e Zd ZdZd� Zd� Zej fd�Zd� Z dd�Z
d� Zd � Zd
S )�ContainerIOzm
A file object that provides read access to a part of an existing
file (for example a TAR file).
c �r � || _ d| _ || _ || _ | j � |� � dS )z�
Create file object.
:param file: Existing file.
:param offset: Start of region, in bytes.
:param length: Size of region, in bytes.
r N)�fh�pos�offset�length�seek)�self�filer r s �1/usr/lib/python3/dist-packages/PIL/ContainerIO.py�__init__zContainerIO.__init__ s: � � ����������������V������ c � � dS )NF� �r s r
�isattyzContainerIO.isatty, s � ��ur c � � |dk r| j |z | _ n|dk r| j |z | _ n|| _ t dt | j | j � � � � | _ | j � | j | j z � � dS )a
Move file pointer.
:param offset: Offset in bytes.
:param mode: Starting position. Use 0 for beginning of region, 1
for current offset, and 2 for end of region. You cannot move
the pointer outside the defined region.
� � r N)r r �max�minr r
r )r r �modes r
r
zContainerIO.seek/ s � � �1�9�9��x�&�(�D�H�H�
�Q�Y�Y��{�V�+�D�H�H��D�H��q�#�d�h���4�4�5�5�������T�[�4�8�+�,�,�,�,�,r c � � | j S )ze
Get current file pointer.
:returns: Offset from start of region, in bytes.
)r r s r
�tellzContainerIO.tellB s � � �x�r r c �� � |rt || j | j z
� � }n| j | j z
}|sd| j j v rdndS | j |z | _ | j � |� � S )z�
Read data.
:param n: Number of bytes to read. If omitted or zero,
read until end of region.
:returns: An 8-bit string.
�br � )r r r r r �read)r �ns r
r zContainerIO.readJ ss � �
� '��A�t�{�T�X�-�.�.�A�A���d�h�&�A�� 6�����-�-�3�3�2�5��8�a�<����w�|�|�A���r c � � d| j j v rdnd}d| j j v rdnd} | � d� � }|sn
||z }||k rn�%|S )zJ
Read a line of text.
:returns: An 8-bit string.
r r r �
�
Tr )r r r )r �s�newline_character�cs r
�readlinezContainerIO.readline[ sv � � �$�'�,�&�&�C�C�B��%(�D�G�L�%8�%8�E�E�d�� �� � �!���A��
���A��A��%�%�%��
� �r c �f � g } | � � � }|sn|� |� � �-|S )zZ
Read multiple lines of text.
:returns: A list of 8-bit strings.
)r'