Staging
v0.5.1
https://github.com/python/cpython
Raw File
Tip revision: cf6fc7906d5abb6e0b9e7e52c94e8b28883672f7 authored by cvs2svn on 05 August 2004, 07:21:01 UTC
This commit was manufactured by cvs2svn to create tag 'r24a2'.
Tip revision: cf6fc79
keywords.py
#! /usr/bin/env python

# This Python program sorts and reformats the table of keywords in ref2.tex

l = []
try:
    while 1:
        l = l + raw_input().split()
except EOFError:
    pass
l.sort()
for x in l[:]:
    while l.count(x) > 1: l.remove(x)
ncols = 5
nrows = (len(l)+ncols-1)/ncols
for i in range(nrows):
    for j in range(i, len(l), nrows):
        print l[j].ljust(10),
    print
back to top