python read stdout as string