358
369
my_sock, subproc_sock = socket.socketpair()
359
371
except (AttributeError, socket.error):
360
372
# This platform doesn't support socketpair(), so just use ordinary
362
374
stdin = stdout = subprocess.PIPE
365
377
stdin = stdout = subproc_sock
367
378
proc = subprocess.Popen(argv, stdin=stdin, stdout=stdout,
368
380
**os_specific_subprocess_params())
371
385
def connect_sftp(self, username, password, host, port):