Fred Drake | e603cb1 | 1998-03-16 16:15:49 +0000 | [diff] [blame] | 1 | #! /usr/bin/env python |
| 2 | |
| 3 | """Really nasty little script to create an empty, labeled index on stdout. |
| 4 | |
| 5 | Do it this way since some shells seem to work badly (and differently) with |
| 6 | the leading '\b' for the first output line. Specifically, /bin/sh on |
| 7 | Solaris doesn't seem to get it right. Once the quoting works there, it |
| 8 | doesn't work on Linux any more. ;-( |
| 9 | """ |
| 10 | __version__ = '$Revision$' |
| 11 | # $Source$ |
| 12 | |
| 13 | import sys |
| 14 | |
| 15 | if sys.argv[1:]: |
| 16 | label = sys.argv[1] |
| 17 | else: |
| 18 | label = "genindex" |
| 19 | |
| 20 | print "\\begin{theindex}" |
| 21 | print "\\label{%s}" % label |
| 22 | print "\\end{theindex}" |