[Python] What is the way to properly pipe output of 'poetry show' command?

Discussão em 'Python' iniciado por Stack, Setembro 26, 2024.

  1. Stack

    Stack Membro Participativo

    I am using python 3.11, poetry version 1.7.1, and on macOS. I have a dependency group, models.

    The output for the following command:

    ❯ poetry show --top-level --only models
    model1 3.7.1 https://github.com/<somerepo>/<somefile>.whl <description text>
    model2 3.7.3 https://github.com/<somerepo>/<somefile>.whl <description text>


    But when I try to pipe the output to a text file, it only pipes:

    model1
    model2


    I have tried grep, awk, setting TERM=dumb but it doesn't seem to pipe the full output. Is this because of special characters?

    I also tried:

    ❯ poetry show --top-level --only models | cat -v
    model1
    model2

    Continue reading...

Compartilhe esta Página