Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(3)  |  Call(1)  |  Derive(0)  |  Import(2)
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 *

    def helper(*args, **kwds):
        return GeneratorContextManager(func(*args, **kwds))

src/s/t/Strap-HEAD/strap/tests/test_strapfile.py   Strap(Download)
from strap import factory
from strap import process
from strap.tests import pushd
import sys
import tempfile

src/s/t/Strap-HEAD/strap/tests/test_process.py   Strap(Download)
from mock import Mock
from nose.tools import raises
from strap.tests import pushd
import logging
import unittest
    def test_output_run(self):
        with pushd('strap'):
            #@@ better call sig
            proc = self._make_one('pwd', stdout=False, return_output=True)
            out = proc.run()