a ``formatter_class`` for ``argparse`` that deals with ANSI colour escapes. Specifically, this formatter does not count escape characters as displayed characters when wrapping ``argparse``'s help text into the terminal.
Project description
Branch |
Build Status |
Coverage Status |
---|---|---|
master |
||
develop |
Install
$ pip install argparse-color-formatter
Usage
Pass in argparse_color_formatter.ColorHelpFormatter to a new argument parser as formatter_class
import argparse
from argparse_color_formatter import ColorHelpFormatter
parser = argparse.ArgumentParser(
formatter_class=ColorHelpFormatter
)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Close
Hashes for argparse-color-formatter-1.2.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6b00f221972ca5c2f6d2c020db8e2bd5796524fd4be5602eb1ccc185531763b0 |
|
MD5 | 9ff40fe603b6977e73c1f413b9e32c16 |
|
BLAKE2b-256 | 647f20cc1976e171948fac085988e7e161261253a1e6a4c9dc1b0b15b10e0d6a |