pycollate: Options to set backend, locale, and encoding.
[python-collate.git] / pysort
diff --git a/pysort b/pysort
deleted file mode 100755 (executable)
index 2e9e2ca..0000000
--- a/pysort
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/usr/bin/env python
-
-import os
-import sys
-import locale
-
-import collate
-
-def main(argv):
-    lines = []
-    encoding = locale.getpreferredencoding()
-
-    print >>sys.stderr, "Backend: " + collate.default.__name__
-    print >>sys.stderr, "Locale: " + collate.collator.locale
-
-    if not argv:
-       argv.append("-")
-    for filename in argv:
-       if filename == "-":
-           fileobj = sys.stdin
-       else:
-           fileobj = open(filename, "rU")
-       for line in fileobj:
-           line = line.strip()
-           line = line.decode(encoding, "replace")
-           lines.append(line)
-    lines.sort(key=collate.key)
-
-    for line in lines:
-       print line.encode(encoding, "replace")
-
-if __name__ == "__main__":
-    main(sys.argv[1:])
-