[issue21747] argvars: error while parsing under windows

2014-06-13 Thread paul j3
paul j3 added the comment: It's essentially the same issue as http://bugs.python.org/issue21666. An error in the 'help' parameter is not caught until 'print_help' is called (via 'parse_args'). A possible improvement is to test the 'help' string during 'add_argument'. Similar testing for 'n

[issue21747] argvars: error while parsing under windows

2014-06-13 Thread R. David Murray
R. David Murray added the comment: You are missing an 's' after the parens. It should be: %(prog)s -- nosy: +r.david.murray resolution: -> not a bug stage: -> resolved status: open -> closed type: -> behavior ___ Python tracker

[issue21747] argvars: error while parsing under windows

2014-06-13 Thread Serhiy Ivanov
New submission from Serhiy Ivanov: have 1.py as: import argparse import sys print (sys.argv) parser = argparse.ArgumentParser(prog='demo') parser.add_argument('--host -h', help='host for the server of %(prog)', nargs=1, required=True, metavar='') parser.add_argument('--port -p', help='port for t