摘要:
我的环境:3台centos7.5 1804 master 192.168.100.140 node1 192.168.100.141 node2 192.168.100.142 三台机器都安装chrony服务 yum -y install chrony master节点 26行和29行取消注释,26 阅读全文
posted @ 2020-10-27 11:06
15号计划
阅读(227)
评论(0)
推荐(0)
摘要:
处理签文件 代码 lines = [] with open('id.txt', 'r') as f_in: for line in f_in: line = line[0:-1] + ':' + '\n' lines.append(line) with open('id_.txt', 'w') as 阅读全文
posted @ 2020-10-27 08:48
15号计划
阅读(956)
评论(0)
推荐(0)
摘要:
处理前文件内容 代码 # 读取代码 fr = open('three.txt', 'r') dic = {} keys = [] # 用来存储读取的顺序 for line in fr: v = line.strip().split(':') dic[v[0]] = v[1] keys.append( 阅读全文
posted @ 2020-10-27 08:40
15号计划
阅读(342)
评论(0)
推荐(0)
摘要:
处理前 代码 ids = [] with open('id.txt') as file: # print(len(file.readlines())) for i in file.readlines(): ids.append(i[12:].split()) def text_save(filena 阅读全文
posted @ 2020-10-27 08:37
15号计划
阅读(1385)
评论(0)
推荐(0)
摘要:
环境python3.6 合并前第一个文件和第二个文件 代码 file1 = open("my.txt","r") file2 = open("ids.txt","r") file1_lists =file1.readlines() file2_lists =file2.readlines() fil 阅读全文
posted @ 2020-10-27 08:32
15号计划
阅读(1144)
评论(0)
推荐(0)
浙公网安备 33010602011771号