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 hashes)
Built Distribution
Close
Hashes for argparsedirs-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 52f01d5cc5a65562b4df32d784f83f2688fe814ed601ec955bfa5a3aca89987c |
|
MD5 | 66d3c94e7ff3c7f6c577cafd778d0631 |
|
BLAKE2b-256 | 8d35b48fcdcd953ef2be541ce322017cc8b75d7514b10436202bd764bf9a76cf |