[Python] How to set only one word in a specific color using Click.secho

Discussão em 'Python' iniciado por Stack, Junho 15, 2025.

  1. Stack

    Stack Membro Participativo

    I'm using the click module.

    pip install click


    This gives me red text

    import click
    click.secho('Error: This error is ...xx', fg='red')


    Now I want that only 'Error:' is shown in red. How can I do this using click.secho?

    Continue reading...

Compartilhe esta Página