我试图从我的本地结构系统将文件复制到使用fabricputput命令的多个远程主机,所以,当我运行它时不会抱怨任何内容它不会复制文件。 其次,我看到我的远程服务器已经有文件,这可能是一个问题吗?在代码下面。 import sys
from fabric.api import env
from fabric.operations import run, put
env.skip_bad_ho
def monkey_patch_string(file_name, old_string, new_string):
# Read in the file
with open(file_name, 'r') as f :
filedata = f.read()
# Replace the target string
filedata = fi