Skip to content
This repository was archived by the owner on Sep 15, 2022. It is now read-only.
This repository was archived by the owner on Sep 15, 2022. It is now read-only.

Using the "rich" module to make program output prettier #81

@ochen1

Description

@ochen1

rich is a Python module I have grown very fond of. It gives immediate beauty to any Python project, and even goes as far as making the exceptions beautiful.

It comes with support for all types of terminals and stdouts, making printing colors and different fonts a breeze. This includes the old terminal we are all used to, and Jupyter notebook output cells. It's syntax is simple, beautiful, and easy to use. Here is a sample:

from rich.console import Console
console = Console()
console.log("This is a [bold]log[/bold]. Time and line numbers will be shown.")
console.print("remocolab installed [green bold]successfully[/]! :tada:")

image

With all of this simplicity, there is still a lot of control over the program's output.

The package size is under 50MB, so it shouldn't impact the lightweightedness of this program much.

Can I implement this into remocolab? I think it would make the output of the program much more attractive.

😍

EDIT: rich installed in under 2s with pip on my system.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions