我收到运行时错误;当我删除“try except”时,它在行 tagstats = open("rramtag256.txt", 'r') 的第一个字母处显示无效语法
我的 rramtag256.txt 肯定有正在搜索的字符串
import sys
import os
import string
tagstats = open("rramtag256.txt", 'r')
list=[]
for line in tagstats:
if "Tag array: Total dynamic read energy/access" in line:
s=line.split()
print s[0]
x=1
if 'Area Components:' in line:
if 'Total leakage read/write power of a bank' in list:
s=list.split()
print s[0]
if x==1:
list.append(line)
tagstats.close()
谢谢,