-1
如何蟒可變輸出傳遞給織物運行如何蟒可變輸出傳遞給織物運行
在以下代碼我想CMD2變量傳遞給織物運行。下面
是我的代碼,但它不工作: -
from fabric.api import *
import sys
import time
import getpass
ip = "host1"
user = raw_input('Please Enter user:')
password = getpass.getpass('Please Enter Password:')
env.hosts = ip
env.user = user
env.password = password
cmd2 = "touch 123.txt"
def commands():
run('ls -l', shell=False)
run('{}', shell=False).format(cmd2)