/pyshd

Change directory in python using contextmanagers

Primary LanguagePythonGNU Lesser General Public License v3.0LGPL-3.0

pyshd

pypi travis readthedocs

pyshd: pushd contextmanager for python

Index

Features

  • Change directory in python using contextmanagers
  • Free software: GNU Lesser General Public License v3

Getting started

Get from pypi

pip install pyshd

Example

>>> 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'

Contributing

We welcome all kinds of contributions, including code, bug reports, issues, feature requests, and documentation.