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.
Release files for contextlib-chdir 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| contextlib-chdir-1.0.2.tar.gz | 1.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| contextlib_chdir-1.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 4.0 kB
Release files / contextlib-chdir-1.0.2.tar.gz
| Download URL | contextlib-chdir-1.0.2.tar.gz |
|---|---|
| Size | 1.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
58406a71db00647fcccfc7e52e9e04e44d29eacf30400e7c0ba3b15f09d5f3fa
|
|
BLAKE2b-256 checksum How to use checksums |
f9ac1b3022cc91497b45a653e86fa91694a63684904388440d71e58ff531687b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.7.13
|
Release files / contextlib_chdir-1.0.2-py3-none-any.whl
| Download URL | contextlib_chdir-1.0.2-py3-none-any.whl |
|---|---|
| Size | 2.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f72f7abd0f87c18a57aee30acf97659ca315157e50bd07e084b8737e0719de3c
|
|
BLAKE2b-256 checksum How to use checksums |
7fac2de09f29c85a1c91d45bbb394d339dbda2b9fcf64d5a43895d2e643b9c39
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.7.13
|