Skip to main content

@popd decorator. restore previous current directory

Project description

Installation

$ [sudo] pip install popd

Functions

function __doc__
popd.popd(func) @popd decorator. restore previous current directory

Examples

import popd

@popd.popd
def func():
    os.chdir('/tmp')
    print(os.getcwd())
>>> os.getcwd()
'/Users/username'
>>> func()
'/tmp'
>>> os.getcwd()
'/Users/username'

python-readme-generator

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

popd-2019.4.11.tar.gz (1.3 kB view hashes)

Uploaded Source

Built Distribution

popd-2019.4.11-py2.py3-none-any.whl (1.9 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page