pyshd: pushd contextmanager for python
- Change directory in python using contextmanagers
- Free software: GNU Lesser General Public License v3
pip install pyshd
>>> from pyshd import pushd
>>> import os
>>> os.getcwd()
'/private/user/projects/pyshd'
>>> with pushd('/tmp'):
... print(os.getcwd())
'/tmp'
>>> os.getcwd()
'/private/user/projects/pyshd'
We welcome all kinds of contributions, including code, bug reports, issues, feature requests, and documentation.