mirror of
https://github.com/python/cpython.git
synced 2025-09-14 20:56:06 +00:00
Revive newind.py. -sigh-
This commit is contained in:
parent
d98329cdf0
commit
e603cb1073
1 changed files with 22 additions and 0 deletions
22
Doc/tools/newind.py
Executable file
22
Doc/tools/newind.py
Executable file
|
@ -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}"
|
Loading…
Add table
Add a link
Reference in a new issue