Skip to main content

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


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 details)

Uploaded Source

Built Distribution

contextlib_chdir-1.0.2-py3-none-any.whl (2.2 kB view details)

Uploaded Python 3

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

Hashes for contextlib-chdir-1.0.2.tar.gz
Algorithm Hash digest
SHA256 58406a71db00647fcccfc7e52e9e04e44d29eacf30400e7c0ba3b15f09d5f3fa
MD5 b3e2d2673fc47080511e4739b2670368
BLAKE2b-256 f9ac1b3022cc91497b45a653e86fa91694a63684904388440d71e58ff531687b

See more details on using hashes here.

File details

Details for the file contextlib_chdir-1.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for contextlib_chdir-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f72f7abd0f87c18a57aee30acf97659ca315157e50bd07e084b8737e0719de3c
MD5 82517e0c453568afaa72018e1a6824cb
BLAKE2b-256 7fac2de09f29c85a1c91d45bbb394d339dbda2b9fcf64d5a43895d2e643b9c39

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page