/opt/alt/python37/lib64/python3.7/site-packages/numpy/distutils
NameSizeModeActions
command/-0755rm
fcompiler/-0755rm
mingw/-0755rm
tests/-0755rm
__pycache__/-0755rm
ccompiler.py285370644editdlrm
compat.py2180644editdlrm
conv_template.py96870644editdlrm
core.py81830644editdlrm
cpuinfo.py229670644editdlrm
environment.py23460644editdlrm
exec_command.py86630644editdlrm
extension.py29670644editdlrm
from_template.py78080644editdlrm
info.py1570644editdlrm
intelccompiler.py42910644editdlrm
lib2def.py35120644editdlrm
line_endings.py20530644editdlrm
log.py27450644editdlrm
mingw32ccompiler.py251470644editdlrm
misc_util.py819720644editdlrm
msvc9compiler.py22580644editdlrm
msvccompiler.py19910644editdlrm
npy_pkg_config.py132430644editdlrm
numpy_distribution.py7000644editdlrm
pathccompiler.py7790644editdlrm
setup.py5890644editdlrm
site.cfg1740644editdlrm
system_info.py852830644editdlrm
unixccompiler.py51560644editdlrm
__config__.py17820644editdlrm
__init__.py7470644editdlrm
__version__.py1510644editdlrm
Edit: /opt/alt/python37/lib64/python3.7/site-packages/numpy/distutils/line_endings.py (2053B)
""" Functions for converting from DOS to UNIX line endings """ from __future__ import division, absolute_import, print_function import sys, re, os def dos2unix(file): "Replace CRLF with LF in argument files. Print names of changed files." if os.path.isdir(file): print(file, "Directory!") return data = open(file, "rb").read() if '\0' in data: print(file, "Binary!") return newdata = re.sub("\r\n", "\n", data) if newdata != data: print('dos2unix:', file) f = open(file, "wb") f.write(newdata) f.close() return file else: print(file, 'ok') def dos2unix_one_dir(modified_files, dir_name, file_names): for file in file_names: full_path = os.path.join(dir_name, file) file = dos2unix(full_path) if file is not None: modified_files.append(file) def dos2unix_dir(dir_name): modified_files = [] os.path.walk(dir_name, dos2unix_one_dir, modified_files) return modified_files #---------------------------------- def unix2dos(file): "Replace LF with CRLF in argument files. Print names of changed files." if os.path.isdir(file): print(file, "Directory!") return data = open(file, "rb").read() if '\0' in data: print(file, "Binary!") return newdata = re.sub("\r\n", "\n", data) newdata = re.sub("\n", "\r\n", newdata) if newdata != data: print('unix2dos:', file) f = open(file, "wb") f.write(newdata) f.close() return file else: print(file, 'ok') def unix2dos_one_dir(modified_files, dir_name, file_names): for file in file_names: full_path = os.path.join(dir_name, file) unix2dos(full_path) if file is not None: modified_files.append(file) def unix2dos_dir(dir_name): modified_files = [] os.path.walk(dir_name, unix2dos_one_dir, modified_files) return modified_files if __name__ == "__main__": dos2unix_dir(sys.argv[1])