Staging
v0.8.1
Revision d31a8036fe416bfd68cb4da99db7ffaca2041420 authored by Guido van Rossum on 08 August 2002, 19:46:52 UTC, committed by Guido van Rossum on 08 August 2002, 19:46:52 UTC
1) Do not attempt to exec a file which does not exist
just to find out what error the operating system
returns. This is an exploitable race on all platforms
that support symbolic links.

2) Immediately re-raise the exception if we get an
error other than errno.ENOENT or errno.ENOTDIR. This
may need to be adapted for other platforms.
1 parent a1a5a89
Raw File
keywords.py
#! /usr/bin/env 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
back to top