2009-03-20 with/asステートメント python C#のusingみたい。Rubyのforeachもこんなのだったような。 >>> with open(r'trial.py') as tr: ... for line in tr: ... print(line)