Use with statements rather than try: finaly: x.close().

This is just about code style.

Now that we don't support Python 2.4, we can use the with statement. This typically turns 4 lines of code into 1,  condensing the code, and making it more readable imo.