]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Patch by Gerrit Holl:
authorGuido van Rossum <guido@python.org>
Mon, 14 Feb 2000 21:42:14 +0000 (21:42 +0000)
committerGuido van Rossum <guido@python.org>
Mon, 14 Feb 2000 21:42:14 +0000 (21:42 +0000)
* In crlf.py and lfcr.py: regsub -> re

Tools/scripts/crlf.py
Tools/scripts/lfcr.py

index 3f843fe9a79eb54691d5efd0b21a4ab91f8a3e9f..58181854016bc7115057d639e8f2a8e3e486ac0f 100755 (executable)
@@ -2,7 +2,7 @@
 
 "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!"
@@ -11,7 +11,7 @@ for file in sys.argv[1:]:
     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")
index 454dc902d676e5b6b7f22091e8860616e8d89163..5f67fe00c214a74dc1a3f7813870c473e011e277 100755 (executable)
@@ -2,7 +2,7 @@
 
 "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!"
@@ -11,7 +11,7 @@ for file in sys.argv[1:]:
     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")