From: Guido van Rossum Date: Mon, 14 Feb 2000 21:42:14 +0000 (+0000) Subject: Patch by Gerrit Holl: X-Git-Tag: v1.6a1~443 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=967e509a812fcdafcf249fc0f015bc25b7c5c730;p=thirdparty%2FPython%2Fcpython.git Patch by Gerrit Holl: * In crlf.py and lfcr.py: regsub -> re --- diff --git a/Tools/scripts/crlf.py b/Tools/scripts/crlf.py index 3f843fe9a79e..58181854016b 100755 --- a/Tools/scripts/crlf.py +++ b/Tools/scripts/crlf.py @@ -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") diff --git a/Tools/scripts/lfcr.py b/Tools/scripts/lfcr.py index 454dc902d676..5f67fe00c214 100755 --- a/Tools/scripts/lfcr.py +++ b/Tools/scripts/lfcr.py @@ -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")