temp.readline() empty?
<p>I'm able to create and write to a temp file, however when reading the file lines are empty. I confirmed temp file has content. Here is my code. Thanks</p>

<pre><code>import tempfile
temp = tempfile.NamedTemporaryFile()

with open("~/somefile.txt") as inf:
    for line in inf:
        if line==line.lstrip():
            temp.write(line)

line = str(temp.readline()).strip()
print line #nothing
</code></pre>
