python subprocess popen stdin write