Mercurial > cpython-lru_cache-weakref
view Doc/tools/keywords.py @ 5817:48b94de85bf3 legacy-trunk
Extensive changes by AMK.
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Thu, 17 Jul 1997 16:29:42 +0000 |
| parents | 0b645726957e |
| children | 286b2ce65248 |
line wrap: on
line source
#! /usr/local/bin/python # This Python program sorts and reformats the table of keywords in ref2.tex import string l = [] try: while 1: l = l + string.split(raw_input()) 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 string.ljust(l[j], 10), print
