dottedmag/path.py — pull request #13 by luciotorre (2012-01-06 22:38:31+00:00)
Title: A path can now be used as a context manager to cd to it.

Sample code:

with path("somedir"):
# do stuff
# now os.getcwd() == somedir