Your IP : 3.143.7.112
o
6��fq � @ sr d dl Z d dlZd dlZd dlZd dlZd dlZd dlmZ ej dv r+d dl
mZ ndZd dl
Z
d dl
mZmZmZmZ h d�Zee d�rRe�e j� e�e j� dZeZeed �p^ejjZeZd6dd�Ze d7dd��Zdd� Z ze
j!Z!W n e"y� e Z!Y nw dd� Z#ze
j$Z$W n e"y� G dd� de%e&�Z$Y nw G dd� dej'd�Z(e
j(�)e(� G dd� de(�Z*e
j*�)e*� d dl+m,Z, e*�)e,� G dd� de(�Z-e
j-�)e-� G d d!� d!e-�Z.G d"d#� d#e-�Z/G d$d%� d%e.�Z0G d&d'� d'e.�Z1G d(d)� d)e-�Z2G d*d+� d+e1e0�Z3G d,d-� d-e*�Z,G d.d/� d/e(�Z4e
j4�)e4� G d0d1� d1ej5�Z6G d2d3� d3e4�Z7G d4d5� d5e7�Z8dS )8� N)�
allocate_lock> Zwin32�cygwin)�setmode)�__all__�SEEK_SET�SEEK_CUR�SEEK_END> r � � � SEEK_HOLEi Zgettotalrefcountr
c C s4 | d u rd} t jjrdd l}|�dt|d � | S )N�localer z"'encoding' argument not specified.r )�sys�flags�warn_default_encoding�warnings�warn�EncodingWarning)�encoding�
stacklevelr � r �,/opt/alt/python310/lib64/python3.10/_pyio.py�
text_encoding+ s
�r �r���Tc C sr t | t�st�| �} t | tttf�std| ��t |t�s$td| ��t |t�s/td| ��|d ur>t |t�s>td| ��|d urMt |t�sMtd| ��t|�}|td� s_t|�t|�kret d| ��d|v } d|v }
d |v }d
|v }d|v }
d|v }d
|v }d|v r�| s�|s�|s�|
r�t d��dd l
}|�dtd� d}
|r�|r�t d��| |
| | dkr�t d��| s�|
s�|s�|s�t d��|r�|d ur�t d��|r�|d ur�t d��|r�|d ur�t d��|r�|dkr�dd l
}|�dt
d� t| | r�dp�d|
r�dp�d |�rd �pd |�r
d
�pd |
�rd�pd ||d�}|}z�d}|dk�s-|dk �r1|�� �r1d}d}|dk �rVt}z
t�|�� �j}W n ttf�yN Y nw |dk�rV|}|dk �r_t d ��|dk�rn|�rj|W S t d!��|
�rwt||�}n| �s�|�s�|�r�t||�}n|
�r�t||�}nt d"| ��|}|�r�|W S t|�}t|||||�}|}||_|W S |�� � )#Nzinvalid file: %rzinvalid mode: %rzinvalid buffering: %r�invalid encoding: %r�invalid errors: %rzaxrwb+tU�xr �w�a�+�t�b�Uz4mode U cannot be combined with 'x', 'w', 'a', or '+'r z'U' mode is deprecatedr
Tz'can't have text and binary mode at oncer z)can't have read/write/append mode at oncez/must have exactly one of read/write/append modez-binary mode doesn't take an encoding argumentz+binary mode doesn't take an errors argumentz+binary mode doesn't take a newline argumentzaline buffering (buffering=1) isn't supported in binary mode, the default buffer size will be used� )�openerFr zinvalid buffering sizezcan't have unbuffered text I/Ozunknown mode: %r)�
isinstance�int�os�fspath�str�bytes� TypeError�set�len�
ValueErrorr r �DeprecationWarning�RuntimeWarning�FileIO�isatty�DEFAULT_BUFFER_SIZE�fstat�fileno�
st_blksize�OSError�AttributeError�BufferedRandom�BufferedWriter�BufferedReaderr �
TextIOWrapper�mode�close)�filer= � bufferingr �errors�newline�closefdr$ ZmodesZcreatingZreadingZwritingZ appendingZupdating�textZbinaryr �raw�result�line_bufferingZbs�bufferr r r �openH s�
x
��
�����
�
rI c C s"