Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Displaying output that is re-written on the same lines

Aperta
#907 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
docker, docker-compose, python
Ambito
cli, tooling

Direzione di ricerca

No files or tests are named. Start by tracing how pyinvoke captures and prints subprocess output for the shown docker compose command, then compare its handling of carriage returns and other control characters with direct terminal output. Done means supported output is rendered with the same in-place updates without breaking existing command output behavior.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

I'm trying to execute docker compose up -d --force-recreate --remove-orphans command via pyinvoke. The command outputs such that it updates on the same lines using control characters. But when executing via pyinvoke, it prints all the lines on separate lines.

Is it possible to have the output printed exactly as by the command?

Example:

docker-compose output (it does print logs for creating containers, but it is over-written by newer logs on the same line):

docker compose up -d --force-recreate --remove-orphans
[+] Running 3/3
 ⠿ Network test_app_default    Created                                                          0.1s
 ⠿ Container test_app-redis-1  Started                                                          1.3s
 ⠿ Container test_app-web-1    Started                                                          1.2s

same using pyinvoke:

docker compose up -d --force-recreate --remove-orphans
Network test_app_default  Creating
Network test_app_default  Created
Container test_app-redis-1  Creating
Container test_app-web-1  Creating
Container test_app-redis-1  Created
Container test_app-web-1  Created
Container test_app-redis-1  Starting
Container test_app-web-1  Starting
Container test_app-web-1  Started
Container test_app-redis-1  Started

Of course I could add the --no-ansi flag to docker-compose, but I was wondering if we can achieve this effect via pyinvoke as well.

Thanks!

Lingua principale
Python
Stelle
4.8k
Fork
412
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di pyinvoke/invoke

Tutte le issue di pyinvoke/invoke

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.