class SmartFormatter(argparse.HelpFormatter):

    def _split_lines(self, text, width):
        if text.startswith('R|'):
            return text[2:].splitlines()
return argparse.HelpFormatter._split_lines(self, text, width)
Python argparse: How to insert newline in the help text?