> file is a reserved keyword in python, and I generally dislike overriding special names

Agreed. I thought the same but didn't try hard to think of a another name :( 

> would it make sense to put the try/except inside the loop, so that the scope is slightly more clear?  In the except, file is definitely going to be correctly set because it is the last value that was assigned before the loop terminated due to an exception, but if the try-except were inside the loop it might be more explicit and obvious? And the except terminates execution of the rest of the function anyway.

The reason why I had it outside the for loop is that it clearly shows breaking of the loop and processing being stopped on error even if except returns. I agree that scope is not very obvious with this choice though. I'll change it.