python stdout read non blocking