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