* In crlf.py and lfcr.py: regsub -> re
"Replace CRLF with LF in argument files. Print names of changed files."
-import sys, regsub, os
+import sys, re, os
for file in sys.argv[1:]:
if os.path.isdir(file):
print file, "Directory!"
if '\0' in data:
print file, "Binary!"
continue
- newdata = regsub.gsub("\r\n", "\n", data)
+ newdata = re.sub("\r\n", "\n", data)
if newdata != data:
print file
f = open(file, "wb")
"Replace LF with CRLF in argument files. Print names of changed files."
-import sys, regsub, os
+import sys, re, os
for file in sys.argv[1:]:
if os.path.isdir(file):
print file, "Directory!"
if '\0' in data:
print file, "Binary!"
continue
- newdata = regsub.gsub("\r?\n", "\r\n", data)
+ newdata = re.sub("\r?\n", "\r\n", data)
if newdata != data:
print file
f = open(file, "wb")