I\'m using argparse in Python2.7 and I would like to display multiple lines in the help text of an argument.
My codes look like this:
import argparse
The simplest thing you could do would be to place the lines in an array and then join them with newlines like so:
help_lines = ['First line', 'Second line', '', 'More lines'] # ... parser.add_argument('--argument', default=None, type=sometype, help='\n'.join(help_lines))