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.

Files for popd, version 2019.4.13
Filename, size File type Python version Upload date Hashes
Filename, size popd-2019.4.13.tar.gz (1.3 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page