diff options
author | Guido van Rossum <guido@python.org> | 2000-02-14 21:42:14 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2000-02-14 21:42:14 (GMT) |
commit | 967e509a812fcdafcf249fc0f015bc25b7c5c730 (patch) | |
tree | 990d39c52945cdb6a9dd6fd7e91298b7ccaccc1a | |
parent | d96287830992142389dc34c0524b480bedbab9e3 (diff) | |
download | cpython-967e509a812fcdafcf249fc0f015bc25b7c5c730.zip cpython-967e509a812fcdafcf249fc0f015bc25b7c5c730.tar.gz cpython-967e509a812fcdafcf249fc0f015bc25b7c5c730.tar.bz2 |
Patch by Gerrit Holl:
* In crlf.py and lfcr.py: regsub -> re
-rwxr-xr-x | Tools/scripts/crlf.py | 4 | ||||
-rwxr-xr-x | Tools/scripts/lfcr.py | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/Tools/scripts/crlf.py b/Tools/scripts/crlf.py index 3f843fe..5818185 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 454dc90..5f67fe0 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") |