I was actually under the impression that we were limited to python 2.5 (i.e. no 'with' keyword). However I spoke to Jay and he said 2.6 (now I have to change my programming environment :see_no_evil: )
I've subsequently changed this to a 'with' block.