将命令所需的输入写到
stdin:
stdin, stdout, stderr = self.client.exec_command(command)stdin.write(name + 'n')stdin.flush()
(您当然需要将name
变量从传播module
到sendCommand
,但我假设您知道该怎么做)。

将命令所需的输入写到
stdin:
stdin, stdout, stderr = self.client.exec_command(command)stdin.write(name + 'n')stdin.flush()
(您当然需要将name
变量从传播module
到sendCommand
,但我假设您知道该怎么做)。