syntax error with open()
<p>I am getting an runtime error; when I remove "try except", it says invalid syntax at first letter of line tagstats = open("rramtag256.txt", 'r') </p>

<p>My rramtag256.txt definitely has the strings being searched</p>

<pre><code>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()
</code></pre>

<p>Thanks,</p>
