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
File details
Details for the file argparse-color-formatter-1.1.1.tar.gz
.
File metadata
- Download URL: argparse-color-formatter-1.1.1.tar.gz
- Upload date:
- Size: 5.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 70d7a3ba92f7806bab2031df4df60e395febbb1dfc949556cdc2ce1952b5b071 |
|
MD5 | 1a6c4093b58b5f6816592ec329b5009c |
|
BLAKE2b-256 | 66e12a0b14ec5f8b9ed9dc6f0f2fa4fd6a3da5824e9e0824c9b68d306479659a |