works in IDLE but not the command prompt
<p>This code works in IDLE but not in the commandline. Why the difference?</p>

<pre><code>poem = 'poem.txt'

f = file(poem)
while True:
    line = f.readline()
    if len(line) == 0:
        break
    print line,
f.close()
</code></pre>

<p>The <code>poem.txt</code> file exists (it is a string). The shell output is this:</p>

<pre><code>"Programming is fun When the work is done if you wanna make your work also fun: use Python!"
</code></pre>

<p>The commandline output is this:</p>

<pre><code>"No such file or directory: 'poem.txt'"
</code></pre>

<p>The <code>poem.txt</code> file is in the same folder as the <code>.py</code> file. What is going wrong here?</p>
