File Handling in Paver (paver.path)

Wrapper around path.py to add dry run support and other paver integration.

paver.path.pushd(*args, **kwds)

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:
        ...do stuff...

Previous topic

distutils and setuptools (paver.setuputils)

Next topic

Documentation Tools (paver.doctools)

This Page