Change working directory utility compatible with with statements
Project description
withcd
Change working directory utility compatible with "with" statement
Changes the working directory while inside the "with" statement, then it changes the working directory back to where it was originally.
Usage
from withcd import cd
from os import getcwd
print(getcwd()) #<path>
with(cd('foo')):
print(getcwd()) #<path>/foo
print(getcwd()) #<path>
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
withcd-1.0.1.tar.gz
(2.1 kB
view details)
Built Distribution
File details
Details for the file withcd-1.0.1.tar.gz
.
File metadata
- Download URL: withcd-1.0.1.tar.gz
- Upload date:
- Size: 2.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b78c26f3b52a96c9fb7ed8c4469880d29d37b5f310d775dad4fb547e6c878338 |
|
MD5 | 62119e511d11f853845f94c01094131c |
|
BLAKE2b-256 | 94e2be6afe1c40425248783a7123f98b911f413b4bfd5fde869f5e1c821dbca0 |
File details
Details for the file withcd-1.0.1-py3-none-any.whl
.
File metadata
- Download URL: withcd-1.0.1-py3-none-any.whl
- Upload date:
- Size: 2.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 203c2e6054d742d40906b4cf2f068f5a77e537ae454b2ef81d6db96d14ac354c |
|
MD5 | 12cb0ac353e59edac615e7e496e26274 |
|
BLAKE2b-256 | 8bbdd84e9aafca6a807a12fb1304f6955a55560fd9a49dd1dde33e5e9227d51a |