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.1.tar.gz
(1.5 kB
view hashes)
Built Distribution
Close
Hashes for contextlib_chdir-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 49ce92b6d489f0d1f0c62e22ed469d93305a3c87768c989ee852b14e90e86ebd |
|
MD5 | f1b45531a948b8e7b28f580b64a918ab |
|
BLAKE2b-256 | 82e0d46324ecbb88c2e003becaa4db27d381fce1391d0d0f0e21a35685899a80 |