On 12/10/24 12:31, Roman Haefeli wrote:
It seems that Python's "print" buffers its output per default. The
issue you experience seems not specific to [command], but happens also
when you pipe the output to some other command, like in:

./counter.py | grep 2

You will see the '2' only appear when the whole script has finished
running.

You can tell print to immediately flush the current buffer:

      print(i, flush=True)
That did the trick, thanks!

---
pd-list@lists.iem.at - the Pure Data mailinglist
https://lists.iem.at/hyperkitty/list/pd-list@lists.iem.at/message/6UW2MAMR6JC5OHXDZH7GHPHX5GUOOKQI/

To unsubscribe send an email to pd-list-le...@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> https://lists.iem.at/

Reply via email to