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