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
Built Distribution
File details
Details for the file contextlib-chdir-1.0.2.tar.gz
.
File metadata
- Download URL: contextlib-chdir-1.0.2.tar.gz
- Upload date:
- Size: 1.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.7.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 58406a71db00647fcccfc7e52e9e04e44d29eacf30400e7c0ba3b15f09d5f3fa |
|
MD5 | b3e2d2673fc47080511e4739b2670368 |
|
BLAKE2b-256 | f9ac1b3022cc91497b45a653e86fa91694a63684904388440d71e58ff531687b |
File details
Details for the file contextlib_chdir-1.0.2-py3-none-any.whl
.
File metadata
- Download URL: contextlib_chdir-1.0.2-py3-none-any.whl
- Upload date:
- Size: 2.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.7.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f72f7abd0f87c18a57aee30acf97659ca315157e50bd07e084b8737e0719de3c |
|
MD5 | 82517e0c453568afaa72018e1a6824cb |
|
BLAKE2b-256 | 7fac2de09f29c85a1c91d45bbb394d339dbda2b9fcf64d5a43895d2e643b9c39 |