diff options
author | Guido van Rossum <guido@python.org> | 1994-08-01 12:18:36 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1994-08-01 12:18:36 (GMT) |
commit | ab3a2504b97d5131779f400717dc491919783dd0 (patch) | |
tree | 03ced22eee028d86931850377b469bea0fabb55d /Doc/tools | |
parent | 7f43da7d61aef59ffb8a0c5042ebdf85c08869c6 (diff) | |
download | cpython-ab3a2504b97d5131779f400717dc491919783dd0.zip cpython-ab3a2504b97d5131779f400717dc491919783dd0.tar.gz cpython-ab3a2504b97d5131779f400717dc491919783dd0.tar.bz2 |
libsocket.tex: send[to] returns nbytes.
libstring.tex: added count().
ref2.tex: new keywords; moved keyword printing program to keywords.py.
Diffstat (limited to 'Doc/tools')
-rw-r--r-- | Doc/tools/keywords.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Doc/tools/keywords.py b/Doc/tools/keywords.py new file mode 100644 index 0000000..52b4d68 --- /dev/null +++ b/Doc/tools/keywords.py @@ -0,0 +1,20 @@ +#! /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 |