AlkantarClanX12
Current Path : /opt/alt/python37/lib64/python3.7/__pycache__/ |
Current File : //opt/alt/python37/lib64/python3.7/__pycache__/_pyio.cpython-37.opt-2.pyc |
B YI~d�e � @ s8 d dl Z d dlZd dlZd dlZd dlZd dlZd dlmZ ej dkrTd dl mZ ndZd dl Z d dl mZmZmZmZ d ddhZee d�r�e�e j� e�e j� d ZeZd3d d�ZG dd� d�ZG dd� d�Zy e jZW n( ek �r G dd� dee�ZY nX 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 dd� de&�Z'G dd � d e&�Z(G d!d"� d"e'�Z)G d#d$� d$e'�Z*G d%d&� d&e&�Z+G d'd(� d(e*e)�Z,G d)d*� d*e#�Z%G d+d,� d,e!�Z-e j-�"e-� G d-d.� d.ej.�Z/G d/d0� d0e-�Z0G d1d2� d2e0�Z1dS )4� N)� allocate_lock> �win32�cygwin)�setmode)�__all__�SEEK_SET�SEEK_CUR�SEEK_END� � � SEEK_HOLEi �r���Tc C sz t | t�st�| �} t | tttf�s0td| ��t |t�sFtd| ��t |t�s\td| ��|d k rzt |t�sztd| ��|d k r�t |t�s�td| ��t|�}|td� s�t|�t|�kr�t d| ��d|k} d|k} d |k}d |k}d|k} d|k}d |k}d|k�rD| �s"|�s"|�s"| �r*t d��dd l }|�dtd� d} |�rX|�rXt d��| | | | dk�rvt d��| �s�| �s�|�s�|�s�t d��|�r�|d k �r�t d��|�r�|d k �r�t d��|�r�|d k �r�t d��t | | �r�d�p�d| �r�d�p�d |�rd �pd |�rd �pd | �r,d�p.d ||d�}|}�yd}|dk�sd|dk �rl|�� �rld}d}|dk �r�t}yt�|�� �j}W n ttfk �r� Y nX |dk�r�|}|dk �r�t d��|dk�r�|�r�|S t d ��| �r�t||�}n<| �s |�s |�rt||�}n| �r(t||�}nt d!| ��|}|�rB|S t|||||�}|}||_|S |�� � Y nX d S )"Nzinvalid file: %rzinvalid mode: %rzinvalid buffering: %rzinvalid encoding: %rzinvalid 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 argument� )�openerFr zinvalid buffering sizezcan't have unbuffered text I/Ozunknown mode: %r)� isinstance�int�os�fspath�str�bytes� TypeError�set�len� ValueError�warnings�warn�DeprecationWarning�FileIO�isatty�DEFAULT_BUFFER_SIZE�fstat�fileno� st_blksize�OSError�AttributeError�BufferedRandom�BufferedWriter�BufferedReader� TextIOWrapper�mode�close)�filer1 � buffering�encoding�errors�newline�closefdr ZmodesZcreatingZreadingZwritingZ appendingZupdating�textZbinaryr"