Readable and Writeable dir action for argparse
Project description
This is a very simple action for argparse that allows
you to specify a readable or a writeable directory as an argparse
action.
I found it on StackOverflow years ago and used it since then,
unfortunately I cannot find the original source now.
I guess it would be best to have this added directly into argparse
anyway.
Usage
Just import and use as an action:
import argparse
import argparsedirs
argparser = argparse.ArgumentParser()
argparser.add_argument('indir', action=argparsedirs.ReadableDir)
argparser.add_argument('outdir', action=argparsedirs.WriteableDir)
args = argparser.parse_args()
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
argparsedirs-0.1.2.tar.gz
(2.1 kB
view details)
Built Distribution
File details
Details for the file argparsedirs-0.1.2.tar.gz
.
File metadata
- Download URL: argparsedirs-0.1.2.tar.gz
- Upload date:
- Size: 2.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a10ba3b013c4d9c9f56f64b853fe6e7194b37f671dbc43ae74b5508562156087 |
|
MD5 | d098a6c788d1c1a07383d0f5370d1ad4 |
|
BLAKE2b-256 | c89528cf9c733f71ff15194fc6d657914453469eb51f5a142a7bd3b90cfff596 |
File details
Details for the file argparsedirs-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: argparsedirs-0.1.2-py3-none-any.whl
- Upload date:
- Size: 2.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 52f01d5cc5a65562b4df32d784f83f2688fe814ed601ec955bfa5a3aca89987c |
|
MD5 | 66d3c94e7ff3c7f6c577cafd778d0631 |
|
BLAKE2b-256 | 8d35b48fcdcd953ef2be541ce322017cc8b75d7514b10436202bd764bf9a76cf |