用Python实现换行符转换的脚本的教程

762次阅读  |  发布于5年以前

很简单的一个东西,在'\n'、'\r\n'、'\r'3中换行符之间进行转换。
用法

复制代码 代码如下:

usage: eol_convert.py [-h] [-r] [-m {u,p,w,m,d}] [-k] [-f]
filename [filename ...]

Convert Line Ending

positional arguments:
filename file names

optional arguments:
-h, --help show this help message and exit
-r walk through directory
-m {u,p,w,m,d} mode of the line ending
-k keep output file date
-f force conversion of binary files

Copyright© 2013-2020

All Rights Reserved 京ICP备2023019179号-8