Hacked By AnonymousFox

Current Path : /opt/alt/python37/lib64/python3.7/distutils/__pycache__/
Upload File :
Current File : //opt/alt/python37/lib64/python3.7/distutils/__pycache__/text_file.cpython-37.opt-2.pyc

B

YI~d�0�@s"ddlZddlZGdd�d�ZdS)�Nc@speZdZdddddddd�Zddd�Zdd	�Zd
d�Zddd
�Zddd�Zddd�Z	dd�Z
dd�Zdd�ZdS)�TextFile�r�strict)�strip_comments�skip_blanks�	lstrip_ws�	rstrip_ws�
join_lines�
collapse_join�errorsNcKs�|dkr|dkrtd��x>|j��D]0}||krBt||||�q$t|||j|�q$Wx&|��D]}||jkrbtd|��qbW|dkr�|�|�n||_||_d|_g|_	dS)Nz7you must supply either or both of 'filename' and 'file'zinvalid TextFile option '%s'r)
�RuntimeError�default_options�keys�setattr�KeyError�open�filename�file�current_line�linebuf)�selfrr�options�opt�r�8/opt/alt/python37/lib64/python3.7/distutils/text_file.py�__init__Ns
zTextFile.__init__cCs&||_tj|jd|jd�|_d|_dS)N�r)rr)r�iorrrr)rrrrrrosz
TextFile.opencCs$|j}d|_d|_d|_|��dS)N)rrr�close)rrrrrrvs
zTextFile.closecCsjg}|dkr|j}|�|jd�t|ttf�rD|�dt|��n|�d|�|�t|��d�|�S)Nz, z
lines %d-%d: z	line %d: �)r�appendr�
isinstance�list�tuple�str�join)r�msg�lineZoutmsgrrr�	gen_errorszTextFile.gen_errorcCstd|�||���dS)Nzerror: )�
ValueErrorr()rr&r'rrr�error�szTextFile.errorcCs tj�d|�||�d�dS)Nz	warning: �
)�sys�stderr�writer()rr&r'rrr�warn�sz
TextFile.warncCs|jr|jd}|jd=|Sd}�x�|j��}|dkr:d}|jr�|r�|�d�}|dkrXnX|dksp||ddkr�|ddkr�dp�d}|d|�|}|��dkr�q$n|�dd�}|j�r"|�r"|dkr�|�d	�|S|j	r�|�
�}||}t|jt
��r|jdd|jd<n|j|jdg|_n:|dk�r0dSt|jt
��rP|jdd|_n|jd|_|j�rv|j�rv|��}n"|j�r�|�
�}n|j�r�|��}|dk�s�|dk�r�|j�r�q$|j�r�|ddk�r�|dd�}q$|d
d�dk�r�|dd
�d}q$|SdS)N���r�#rr�\r+z\#z2continuation line immediately precedes end-of-file���z\
)rr�readliner�find�strip�replacer	r/r
�lstripr!rr"rr�rstripr)rr'Zbuildup_line�posZeolrrrr4�sf




	



zTextFile.readlinecCs,g}x"|��}|dkr|S|�|�qWdS)N)r4r )r�linesr'rrr�	readlinesszTextFile.readlinescCs|j�|�dS)N)rr )rr'rrr�
unreadlineszTextFile.unreadline)NN)N)N)N)
�__name__�
__module__�__qualname__r
rrrr(r*r/r4r<r=rrrrr
s ;
!	



x
r)r,rrrrrr�<module>s

Hacked By AnonymousFox1.0, Coded By AnonymousFox