ok
Direktori : /opt/alt/python38/lib64/python3.8/__pycache__/ |
Current File : //opt/alt/python38/lib64/python3.8/__pycache__/fileinput.cpython-38.opt-2.pyc |
U .��cu9 � @ s� d dl Z d dlZdddddddd d ddd gZdad!ddd�dd�Zdd� Zdd� Zdd� Zdd� Zdd� Z dd� Z dd � Zdd � ZG dd� d�Z dd� Zd"dd �Zdd� Zed kr�e� dS )#� N�input�close�nextfile�filename�lineno� filelineno�fileno�isfirstline�isstdin� FileInput�hook_compressed�hook_encodedF� �r��mode�openhookc C s( t rt jrtd��t| ||||d�a t S )Nzinput() already activer )�_state�_file�RuntimeErrorr )�files�inplace�backupr r � r �./opt/alt/python38/lib64/python3.8/fileinput.pyr S s c C s t } d a | r| �� d S �N)r r )�stater r r r ` s c C s t std��t �� S �Nzno active input())r r r r r r r r h s c C s t std��t �� S r )r r r r r r r r v s c C s t std��t �� S r )r r r r r r r r s c C s t std��t �� S r )r r r r r r r r � s c C s t std��t �� S r )r r r r r r r r � s c C s t std��t �� S r )r r r r r r r r � s c C s t std��t �� S r )r r r r r r r r � s c @ s� e Zd Zd(ddd�dd�Zdd � Zd d� Zdd � Zdd� Zdd� Zdd� Z dd� Z dd� Zdd� Zdd� Z dd� Zdd� Zd d!� Zd"d#� Zd$d%� Zd&d'� ZdS ))r NFr r r c C s t |t�r|f}nBt |tj�r,t�|�f}n(|d krBtjdd � }|sLd}nt|�}|| _|| _ || _ d | _d | _d | _ d| _d| _d | _d| _d | _|dkr�td��d|kr�dd l}|�dtd � || _d|kr�|�d d�nd| _|�r|r�td��t|��std ��|| _d S )N� )�-r F)r ZrU�U�rbz=FileInput opening mode must be one of 'r', 'rU', 'U' and 'rb'r z'U' mode is deprecated� r �wz4FileInput cannot use an opening hook in inplace modez#FileInput openhook must be callable)� isinstance�str�os�PathLike�fspath�sys�argv�tuple�_files�_inplace�_backup�_savestdout�_output� _filename�_startlineno�_filelinenor �_isstdin�_backupfilename� ValueError�warnings�warn�DeprecationWarning�_mode�replace�_write_mode�callable� _openhook)�selfr r r r r r7 r r r �__init__� sH � zFileInput.__init__c C s | � � d S r �r �r? r r r �__del__� s zFileInput.__del__c C s z| �� W 5 d| _ X d S )Nr )r, r rB r r r r � s zFileInput.closec C s | S r r rB r r r � __enter__� s zFileInput.__enter__c C s | � � d S r rA )r? �type�value� tracebackr r r �__exit__� s zFileInput.__exit__c C s | S r r rB r r r �__iter__� s zFileInput.__iter__c C s6 | � � }|r| jd7 _|S | js(t�| �� q d S �Nr )� _readliner3 r � StopIterationr �r? �liner r r �__next__� s zFileInput.__next__c C sX dd l }|jdtdd� || �� kr,td��z | �� W S tk rR td��Y nX d S )Nr zTSupport for indexing FileInput objects is deprecated. Use iterator protocol instead.r"