| Server IP : 127.0.0.1 / Your IP : 216.73.216.109 Web Server : Apache/2.4.54 (Win64) OpenSSL/1.1.1q PHP/8.1.10 System : Windows NT DESKTOP-E5T4RUN 10.0 build 19045 (Windows 10) AMD64 User : SERVERWEB ( 0) PHP Version : 8.1.10 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/cygwin64/lib/python3.9/site-packages/PIL/__pycache__/ |
Upload File : |
a
h�aC � @ s d dl Z G dd� d�ZdS )� Nc @ sP e Zd ZdZdd� Zdd� Zejfdd�Zdd � Z ddd�Z
d
d� Zdd� ZdS )�ContainerIOzm
A file object that provides read access to a part of an existing
file (for example a TAR file).
c C s( || _ 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 � r
�3/usr/lib/python3.9/site-packages/PIL/ContainerIO.py�__init__ s
zContainerIO.__init__c C s dS )NFr
�r r
r
r �isatty, s zContainerIO.isattyc C s` |dkr| j | | _ n|dkr,| j| | _ n|| _ tdt| j | j��| _ | j�| j| j � 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 �moder
r
r r / s zContainerIO.seekc C s | j S )ze
Get current file pointer.
:returns: Offset from start of region, in bytes.
)r r
r
r
r �tellB s zContainerIO.tellr c C sT |rt || j| j �}n| j| j }|s<d| jjv r8dS dS | j| | _| 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.
�b� � )r r r r r �read)r �nr
r
r r J s zContainerIO.readc C sP d| j jv rdnd}d| j jv r$dnd}| �d�}|s8qL|| }||kr(qLq(|S )zJ
Read a line of text.
:returns: An 8-bit string.
r r r �
�
r )r r r )r �sZnewline_character�cr
r
r �readline[ s
zContainerIO.readlinec C s"