))
e.write('\n')
f.close()
if choose_input == 2:
user_input=input("例如:www.newboy.org"
"请输入要修改的内容:")
user_input2=input("例如:www.newboy.com"
"请输入修改后的内容:")
f = open('haproxy.txt', encoding='utf-8')
f_new=open("haproxybak.txt","w",encoding='utf-8')
for lines in f:
if user_input in lines:
lines = lines.replace(user_input,user_input2)
f_new.write(lines)
f.close()
f_new.close()
print("修改完毕,请查看haproxybak.txt")
if choose_input == 4:
user_input=input("例如:www.oldboy.org"
"请输入要删除的内容:")
a = ("backend %s\n" % user_input)
f = open('haproxy.txt', encoding='utf-8')
f_new=open("haproxybak.txt","w",encoding='utf-8')
for lines in f:
if a in lines:
lines = lines.replace(a,'')
d = c + 1
elif d == c :
lines = ""
f_new.write(lines)
c += 1
f.close()
f_new.close()
print("节点已删除,请查看haproxybak.txt")
else:
print("请输入正确序号!!!")
代码
夕阳斜照将酒馆招牌影子拖长,
矮胖的老板在柜台后面算着酒账,
客人们喝着麦酒看着舞台之上,
抱着琴的诗人正在懒懒吟唱:
“……当所有传奇写下第一个篇章
原来所谓英雄也和我们一样。
|