summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>1998-03-16 16:15:49 (GMT)
committerFred Drake <fdrake@acm.org>1998-03-16 16:15:49 (GMT)
commite603cb107363efe497f3c81ce09fc233d0b58d29 (patch)
tree8548743feb7dd9a3627257f771c43dde75bf8b5f
parentd98329cdf002fbd7f96a1a02c924c6742876f73d (diff)
downloadcpython-e603cb107363efe497f3c81ce09fc233d0b58d29.zip
cpython-e603cb107363efe497f3c81ce09fc233d0b58d29.tar.gz
cpython-e603cb107363efe497f3c81ce09fc233d0b58d29.tar.bz2
Revive newind.py. -sigh-
-rwxr-xr-xDoc/tools/newind.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/Doc/tools/newind.py b/Doc/tools/newind.py
new file mode 100755
index 0000000..b3a263b
--- /dev/null
+++ b/Doc/tools/newind.py
@@ -0,0 +1,22 @@
+#! /usr/bin/env python
+
+"""Really nasty little script to create an empty, labeled index on stdout.
+
+Do it this way since some shells seem to work badly (and differently) with
+the leading '\b' for the first output line. Specifically, /bin/sh on
+Solaris doesn't seem to get it right. Once the quoting works there, it
+doesn't work on Linux any more. ;-(
+"""
+__version__ = '$Revision$'
+# $Source$
+
+import sys
+
+if sys.argv[1:]:
+ label = sys.argv[1]
+else:
+ label = "genindex"
+
+print "\\begin{theindex}"
+print "\\label{%s}" % label
+print "\\end{theindex}"