0
嗨,我有問題。在一個python腳本中找到的ssh變量轉換爲另一個python腳本,然後執行第二個腳本
我想發送腳本b中發現的變量x到腳本b,然後用該變量執行腳本b。
例子:
腳本
x = 10
ssh = paramiko.SSHClient()
ssh.connect(server, username=username, password=password)
ssh_stdin, ssh_stdout, ssh_stderr = ssh.exec_command(x >> scriptB.py)
ssh_stdin, ssh_stdout, ssh_stderr = ssh.exec_command(./scriptB.py)
腳本B
y = x
print y
我如何能做到這一點任何想法?
謝謝
這對我有效!謝謝aychedee :) – Adilicious 2013-03-28 13:48:07
要麼'x ='10'或'「./scriptB.py」+ str(x)'... – glglgl 2013-11-03 22:37:07
是的好點。更新。 – aychedee 2013-11-04 10:06:06