Chris Bruner added the comment:
Tried the format you gave. Still doesn't work. Same error message:
bernoulli:myclu cwbrune$ argparse_nargs_file_bug.py
usage: argparse_nargs_file_bug.py [-h] [-t N N N]
argparse_nargs_file_bug.py: error: argument -t/--triple: expected 3 argument(s)
bernoulli:myclu cwbrune$ cat argparse_nargs_file_bug.py
#!/usr/bin/env python
import argparse
p = argparse.ArgumentParser(description='Reproduce argparse nargs file bug',
fromfile_prefix_chars='@')
p.add_argument('-t', '--triple', metavar='N', nargs=3)
args = p.parse_args(['@input.opts'])
print args
bernoulli:myclu cwbrune$ cat input.opts
--triple
1
2
3
-t
2
2
32
bernoulli:myclu cwbrune$
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue22050>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com