Staging
v0.8.1
https://github.com/python/cpython
Raw File
Tip revision: 54e3cf06331d484ba7711e75d2bb34c212b2c9fa authored by Tim Peters on 02 August 2006, 18:19:35 UTC
Add missing svn:eol-style property to text files.
Tip revision: 54e3cf0
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