diff makeitso/python_package/{{package}}/{{main}}.py @ 206:d9d7bfdb54db

http://stackoverflow.com/questions/4375327/python-argparse-preformatted-help-text
author Jeff Hammel <k0scist@gmail.com>
date Fri, 21 Nov 2014 14:36:17 -0800
parents 0a991b8fe839
children 04c5464355b8
line wrap: on
line diff
--- a/makeitso/python_package/{{package}}/{{main}}.py	Fri Nov 21 12:19:07 2014 -0800
+++ b/makeitso/python_package/{{package}}/{{main}}.py	Fri Nov 21 14:36:17 2014 -0800
@@ -29,6 +29,7 @@
 class Parser(argparse.ArgumentParser):
     """CLI option parser"""
     def __init__(self, **kwargs):
+        kwargs.setdefault('formatter_class', argparse.RawTextHelpFormatter)
         kwargs.setdefault('description', __doc__)
         argparse.ArgumentParser.__init__(self, **kwargs)
         self.options = None