exaloop / codon

A high-performance, zero-overhead, extensible Python compiler using LLVM
https://docs.exaloop.io/codon
Other
13.95k stars 498 forks source link

Unbuffered output #529

Open dawe opened 5 months ago

dawe commented 5 months ago

I'm running some codon generated executables in batch mode and I realized it sends to stdout just as Python (kind of expected), that is a buffered output. I know in Python I can run a script using the -u switch to have unbuffered stdout, is there something similar for codon?

inumanag commented 5 months ago

Not yet—we can add this in the later versions (wasn't even aware of -u until now). For now, you'll have to flush the stdout manually (stdout.flush() should work) or use stderr.