Skip to content

joemarchionna/prettyHelpFrmt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

prettyHelpFrmt - Python argparse HelpFormatter

argparse HelpFormatter-derived class that helps with text alignment when the -h argparse switch is invoked. It left aligns the second set of actions for each switch based on a code-supplied constant

Based on the code here: argparse

Dependancies

This project uses the following projects:

  • argparse

Use

see the file prettyHelpFrmt/cmdPretty.py to see the formatter code used

the file prettyHelpFrmt/cmdOriginal.py the originally-supplied help formatter

Both run the same command switches, see the example output below. Note that if using sub_parsers, you need to specifiy the formatter_class when creating the sub_parser, otherwise the help for the sub_parser will revert back to the default HelpFormatter

Example

bash example

About

Python argparse HelpFormatter-derived class

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages