File Handling in Paver (paver.path) — Paver 1.2.1 documentation

### Navigation

- index
- modules |
- next |
- previous |
- Paver 1.2.1 documentation »
- The Paver Standard Library »

# 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...

### Navigation

- index
- modules |
- next |
- previous |
- Paver 1.2.1 documentation »
- The Paver Standard Library »