@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'
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)
Built Distribution
Close
Hashes for popd-2019.4.11-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 19561eeb211607a73aab57bdb7bf5e51fb05c25af3fe774e1095c7ab268ed363 |
|
MD5 | d9dd38629d812a9bce70586c50cc3b85 |
|
BLAKE2b-256 | 69695ac150d7102b844ccf0adbb905867245b56a5587c179121b483f308a04cc |