This uses a full PTY instead of a pipe for stderr. rospy seems to look at each individual channel (stdout/stderr) to determine whether it should colorize the output - so we have to provide a PTY for both.
This also fixes flushing problems with Python 3 - it seems Python 3 enables buffering separately for stderr if stderr is not connected to a terminal (see #147).
This uses a full PTY instead of a pipe for stderr.
rospy
seems to look at each individual channel (stdout/stderr) to determine whether it should colorize the output - so we have to provide a PTY for both.This also fixes flushing problems with Python 3 - it seems Python 3 enables buffering separately for stderr if stderr is not connected to a terminal (see #147).