diff options
author | Fred Drake <fdrake@acm.org> | 1998-02-27 05:18:28 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 1998-02-27 05:18:28 (GMT) |
commit | 4f4e920889889cc280b5968fe41618c569c1fc71 (patch) | |
tree | 7e27318d1cae925ee6c65728f0940fbfe04177a1 /Doc/tools/newind.py | |
parent | bdab730cf3b9fd7b5583b5652934bf8d80f78170 (diff) | |
download | cpython-4f4e920889889cc280b5968fe41618c569c1fc71.zip cpython-4f4e920889889cc280b5968fe41618c569c1fc71.tar.gz cpython-4f4e920889889cc280b5968fe41618c569c1fc71.tar.bz2 |
Use a Python script to create "empty" indexes. This solves Guido's
corrupted file problem and avoids the shell escape interpretation
portability problem. ;-( See comments at top of newind.py for an
explanation.
Diffstat (limited to 'Doc/tools/newind.py')
-rwxr-xr-x | Doc/tools/newind.py | 22 |
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}" |