[issue15874] argparse cannot parse shell variable arguments in file-given arguments

Steven Bethard report at bugs.python.org
Fri Sep 7 09:29:14 CEST 2012


Steven Bethard added the comment:

You could try declaring a type converter and using the type= parameter of add_argument. Your type converter could look something like:

    def expanded_path(arg):
        return os.path.expandvars(arg)

Would that work?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue15874>
_______________________________________


More information about the Python-bugs-list mailing list