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