我試圖從我的本地結構系統將文件複製到使用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