contextlib2

Backports and enhancements for the contextlib module

Here are some articles that you may find helpful