Peter Hansen wrote: > Duncan's response says it all, but here's the solution > if you don't like the uncertainty inherent in the above: > > f = open(filename, 'r') > try: > text = f.read() > finally: > f.close() > But the uncertainty remains in case of an anonymous file, doesn't it? Sergey