HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //usr/local/lib/python3.10/dist-packages/numpy/distutils/__pycache__/line_endings.cpython-310.pyc
o

���g��@sjdZddlZddlZddlZdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	e
dkr3eejd�dSdS)z9 Functions for converting from DOS to UNIX line endings

�NcCs�tj�|�r
t|d�dSt|d��}|��}Wd�n1s!wYd|vr1t|d�dSt�dd|�}||kr^td|�t|d	��}|�|�Wd�|S1sWwY|St|d
�dS)zFReplace CRLF with LF in argument files.  Print names of changed files.�
Directory!N�rb��Binary!�
�
z	dos2unix:�wb�ok�	�os�path�isdir�print�open�read�re�sub�write��file�fp�data�newdata�f�r�G/usr/local/lib/python3.10/dist-packages/numpy/distutils/line_endings.py�dos2unix	s&

�


��rcCs6|D]}tj�||�}t|�}|dur|�|�qdS�N)rr�joinr�append��modified_files�dir_name�
file_namesr�	full_pathrrr�dos2unix_one_dir�
��r%cC�g}tj�|t|�|Sr)rr�walkr%�r"r!rrr�dos2unix_dir%�r*cCs�tj�|�r
t|d�dSt|d��}|��}Wd�n1s!wYd|vr1t|d�dSt�dd|�}t�dd|�}||kretd|�t|d	��}|�|�Wd�|S1s^wY|St|d
�dS)zFReplace LF with CRLF in argument files.  Print names of changed files.rNrrrrrz	unix2dos:rr	r
rrrr�unix2dos+s(

�


��r,cCs6|D]}tj�||�}t|�|dur|�|�qdSr)rrrr,rr rrr�unix2dos_one_dir@r&r-cCr'r)rrr(r-r)rrr�unix2dos_dirGr+r.�__main__�)�__doc__rr�sysrr%r*r,r-r.�__name__�argvrrrr�<module>s�