1 Star 0 Fork 0

obarong / read_kernel

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
read.py 502 Bytes
一键复制 编辑 原始数据 按行查看 历史
obarong 提交于 2020-01-10 13:26 . first commit
path = "20-01-10-08-39-40kernel.txt"
def readfile(name):
fin=open(name, 'r')
fout = open(path + ".out.txt", 'w')
for lines in fin.readlines(): #按行读取text中的内容
if 'IBAT=' in str(lines):
#print(lines)
index = lines.find('IBAT=')
index2 = lines.find(': VSYS=')
fout.write(lines[index + 7: index2] + '\n')
fout.close()
fin.close()
if __name__ == "__main__":
readfile(path)
1
https://gitee.com/obarong/read_kernel.git
git@gitee.com:obarong/read_kernel.git
obarong
read_kernel
read_kernel
master

搜索帮助