python subprocess pipe stdout to stdin