python read stdout from running process