[issue29626] Issue with spacing in argparse module while using help

paul j3 report at bugs.python.org
Mon Feb 27 16:57:15 EST 2017


paul j3 added the comment:

With this setup

import argparse
parser=argparse.ArgumentParser(prog='cli')
parser.add_argument('nodes')
sp=parser.add_subparsers()
p1 = sp.add_parser('list', description='Lists nodes in your current project')
p1.add_argument('-p','--projectid', action='store_true')
p1.add_argument('-o', '--org', action='store_true', help=' (For administrators only) Lists all the nodes in')
parser.parse_args()


this help looks normal

1354:~/mypy/argdev$ python3 issue29626.py nodes list -h
usage: cli nodes list [-h] [-p] [-o]

Lists nodes in your current project

optional arguments:
  -h, --help       show this help message and exit
  -p, --projectid
  -o, --org        (For administrators only) Lists all the nodes in

Without further feedback this issue should be closed

----------

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


More information about the Python-bugs-list mailing list