diff --git a/paver/path.py b/paver/path.py index 6fd30b19..a4995e69 100644 --- a/paver/path.py +++ b/paver/path.py @@ -20,15 +20,15 @@ @contextmanager def pushd(dir): - '''A context manager (Python 2.5+ only) for stepping into a - directory and automatically coming back to the previous one. + '''A context manager (Python 2.5+ only) for stepping into a + directory and automatically coming back to the previous one. The original directory is returned. Usage is like this:: - + from __future__ import with_statement # the above line is only needed for Python 2.5 - + from paver.easy import * - + @task def my_task(): with pushd('new/directory') as old_dir: @@ -85,4 +85,3 @@ def wrapper(*args, **kwds): for name in _METHOD_BLACKLIST: wrapper = _make_wrapper(name, getattr(_orig_path, name)) setattr(path, name, wrapper) -