Skip to content

Hanging pipes in python2 #359

@jmarkow

Description

@jmarkow

Hopefully I'm using this as intended, but I'm trying to add a simple progress bar to a bash script.

#!/bin/bash

while true; do
        echo -ne "Testing\n"
        sleep 1
done

The output looks as intended (testing printed on a new line every 1 second). However, tqdm never progresses if I pipe in the output from this program as follows (tried with and without totals, different delimiters, all no luck):

./test.sh | tqdm --total "5"

The output is stuck here (checked up to 10 minutes).

0it [00:00, ?it/s]

I've used tqdm in plenty of Python scripts but I'm not entirely sure I grok its usage in the command line.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions