Skip to main content

Beginner-friendly pretty printing

Project description

print-extended

PyPI CI codecov

An extended version of the print function.

The intent is to make it easy to print pretty outputs, with an interface that Python beginners who just made their first "Hello World" can use.

You can always use pprint, sys.stderr, etc., and probably should for complex usage. As stated, this is to be beginner-friendly. Functionality will be sacrificed for ease-of-use.

Features

  • print.group and print.endgroup to create indentation levels
  • foreground colors
    • print.red('foo')
    • print.green('foo')
    • print.blue('foo')
    • print.yellow('foo')
    • print.magenta('foo')
    • print.cyan('foo')
    • print.rgb(r, g, b)('foo')
  • background colors
    • print.on_red('foo')
    • print.on_green('foo')
    • print.on_blue('foo')
    • print.on_yellow('foo')
    • print.on_magenta('foo')
    • print.on_cyan('foo')
    • print.on_rgb(r, g, b)('foo')
  • text styles
    • print.bold('foo')
    • print.italic('foo')
    • print.underline('foo')
    • Also chainable! print.red.bold.italic('error')
  • eprint to simplify printing to STDERR

Development

# Activate virtual environment
python -m pip install -U pip
python -m pip install .
python -m pip install -r requirements-dev.txt
pre-commit install

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python-print-extended-0.1.1.tar.gz (3.9 kB view hashes)

Uploaded Source

Built Distribution

python_print_extended-0.1.1-py3-none-any.whl (4.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page