[Supervisor-users] flush output

Antonio Beamud Montero antonio.beamud at copypaste.es
Thu Oct 2 11:21:00 EDT 2008


El jue, 02-10-2008 a las 10:56 -0400, Chris McDonough escribió:
> Antonio Beamud Montero wrote: 
> > Can I force the flush of the output buffers in any way?
> 
> You might be able to run the process in "unbuffered" mode.  The mechanism to do
> this is different for each subprocess, but if e.g. your subprocess was a Python
> program, you might do:
> 
> python -u mysubprocess.py

Ok, works fine.
I was using:

sys.stdout.write(line)

And I thought that was sufficient, but I was wrong...

I've changed the first line to:

#!/usr/bin/python -u

A lot of thanks, Chris.




More information about the Supervisor-users mailing list