# you need to add it in python 2.5 and earlier from __future__ import with_statement
The 'with' statement is a new control-flow structure whose basic structure is: with expression [as variable]: with-block