source: trunk/essentials/dev-lang/python/Doc/tools/keywords.py

Last change on this file was 3225, checked in by bird, 19 years ago

Python 2.5

File size: 392 bytes
Line 
1#! /usr/bin/env python
2
3# This Python program sorts and reformats the table of keywords in ref2.tex
4
5l = []
6try:
7 while 1:
8 l = l + raw_input().split()
9except EOFError:
10 pass
11l.sort()
12for x in l[:]:
13 while l.count(x) > 1: l.remove(x)
14ncols = 5
15nrows = (len(l)+ncols-1)/ncols
16for i in range(nrows):
17 for j in range(i, len(l), nrows):
18 print l[j].ljust(10),
19 print
Note: See TracBrowser for help on using the repository browser.