I think this question is more of a \"coding style\" rather than technical issue.
Said I have a line of code:
buf = open(\'test.txt\',\'r\').readlines
It will be automatically closed, but it depends on implementation exactly when. It's nicer to explicitly use a with-block, but if you are just writing a small script for yourself that you run occasionally it doesn't really matter.