diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 2003-11-19 14:34:18 (GMT) |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 2003-11-19 14:34:18 (GMT) |
commit | 28ecf70db57828db2ca279643bf9aeca7662f35c (patch) | |
tree | 09b7767bbc411f85313b58d6fe7e5e67d9392973 /Mac/scripts/crlf.py | |
parent | 6045b9c93511c767f6cfa2d2fa299c76181acd9b (diff) | |
download | cpython-28ecf70db57828db2ca279643bf9aeca7662f35c.zip cpython-28ecf70db57828db2ca279643bf9aeca7662f35c.tar.gz cpython-28ecf70db57828db2ca279643bf9aeca7662f35c.tar.bz2 |
Getting rid of support for MacOS9 and earlier. This is the first step,
and the biggest in size, but probably the easiest. Hunting through the
source code comes next.
Diffstat (limited to 'Mac/scripts/crlf.py')
-rwxr-xr-x | Mac/scripts/crlf.py | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/Mac/scripts/crlf.py b/Mac/scripts/crlf.py deleted file mode 100755 index 6506cdc..0000000 --- a/Mac/scripts/crlf.py +++ /dev/null @@ -1,29 +0,0 @@ -#! /usr/local/bin/python - -# Replace \r by \n -- useful after transferring files from the Mac... -# Run this on UNIX. -# Usage: crlf.py file ... - -import sys -import os -import string - -def main(): - args = sys.argv[1:] - if not args: - print 'usage:', sys.argv[0], 'file ...' - sys.exit(2) - for file in args: - print file, '...' - data = open(file, 'r').read() - lines = string.splitfields(data, '\r') - newdata = string.joinfields(lines, '\n') - if newdata != data: - print 'rewriting...' - os.rename(file, file + '~') - open(file, 'w').write(newdata) - print 'done.' - else: - print 'no change.' - -main() |