blob: 9f32056db21a81eea7157a1835937c72cba7c4bf [file] [log] [blame]
Fred Drake2e1094e1999-04-09 14:53:35 +00001#! /usr/bin/env python
Guido van Rossumab3a2501994-08-01 12:18:36 +00002
3# This Python program sorts and reformats the table of keywords in ref2.tex
4
Guido van Rossumab3a2501994-08-01 12:18:36 +00005l = []
6try:
Tim Peters3d7d3722004-07-18 06:25:50 +00007 while 1:
8 l = l + raw_input().split()
Guido van Rossumab3a2501994-08-01 12:18:36 +00009except EOFError:
Tim Peters3d7d3722004-07-18 06:25:50 +000010 pass
Guido van Rossumab3a2501994-08-01 12:18:36 +000011l.sort()
12for x in l[:]:
Tim Peters3d7d3722004-07-18 06:25:50 +000013 while l.count(x) > 1: l.remove(x)
Guido van Rossumab3a2501994-08-01 12:18:36 +000014ncols = 5
15nrows = (len(l)+ncols-1)/ncols
16for i in range(nrows):
Tim Peters3d7d3722004-07-18 06:25:50 +000017 for j in range(i, len(l), nrows):
18 print l[j].ljust(10),
19 print