I would like to redirect the output of a script (Python or any other kind) to a file. Easy to do with > or >>.
But with these two the output seems to be written in the file only once the script returns. Is there a way to write the output in the file as soon as it is redirected from the standard output ? Kind of like a log file that can be accessed to read the last steps of the script.
Thanks in advance.