Backport of contextlib.chdir stdlib class added in Python3.11.
Project description
contextlib-chdir
Backport of contextlib.chdir
stdlib class added in Python3.11.
Install
pip install contextlib-chdir
Usage
import os
import tempfile
from contextlib_chdir import chdir as chdir_ctx
with chdir_ctx(tempfile.gettempdir()):
print(os.getcwd()) # /tmp
Note
You'll probably want to migrate to contextlib2
when
this change is included.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
contextlib-chdir-1.0.2.tar.gz
(1.9 kB
view hashes)
Built Distribution
Close
Hashes for contextlib_chdir-1.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f72f7abd0f87c18a57aee30acf97659ca315157e50bd07e084b8737e0719de3c |
|
MD5 | 82517e0c453568afaa72018e1a6824cb |
|
BLAKE2b-256 | 7fac2de09f29c85a1c91d45bbb394d339dbda2b9fcf64d5a43895d2e643b9c39 |