[New-bugs-announce] [issue42572] Better path handling with argparse

Austin Scola report at bugs.python.org
Fri Dec 4 17:42:15 EST 2020

New submission from Austin Scola <austinscola at gmail.com>:

One of the types of arguments that I find myself most often passing to `argparse.ArgumentParser` is paths. I think that I am probably not alone in frequent usage of paths as arguments. Given this, it would be extremely helpful to have an `argparse.Action` in `argparse` or an type similar to `FileType` that converted the string to a path. A path type factory could also have an arguments to optionally check if the path exists, or is a directory, or other similar predicates.

components: Library (Lib)
messages: 382542
nosy: ascola
priority: normal
severity: normal
status: open
title: Better path handling with argparse
type: enhancement

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list