Mercurial > cpython-lru_cache-weakref
diff Mac/scripts/crlf.py @ 1795:fa8bbd09f2e6 legacy-trunk
Updates for THINK C 6.0. Moved the necessary UNIX emulation routines here.
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Fri, 19 Aug 1994 10:51:31 +0000 |
| parents | f50fe4b952ba |
| children |
line wrap: on
line diff
--- a/Mac/scripts/crlf.py Thu Aug 18 16:18:13 1994 +0000 +++ b/Mac/scripts/crlf.py Fri Aug 19 10:51:31 1994 +0000 @@ -1,5 +1,9 @@ #! /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 @@ -7,8 +11,8 @@ def main(): args = sys.argv[1:] if not args: - print 'no files' - sys.exit(1) + print 'usage:', sys.argv[0], 'file ...' + sys.exit(2) for file in args: print file, '...' data = open(file, 'r').read()
