Post

In Python 3.15, argparse is going to support colourized code snippets in help descriptions and epilogs 🎉!

5 reposts76 likes

Love it! And once again it reminds me that I’d love to know why the description for the help switch starts lower case; which then bothers me because, like your example, I’m compelled to use capital case for my own switches. 😅

Ah yes, the capitalization is a relic from optparse, I think (common UNIX convention, same behaviour). That said, you can use add_help=False on the parser and then add your own custom help argument (and do the same for version).