title: How to use python markdown to process a file that is read in?
body: <p>I have a file myfile.txt.</p>
  
  <h1>hello</h1>
  
  <p>And I have the following script:</p>
  
  <pre><code>#!/usr/bin/python 
  import markdown
  
  f = open('myfile.txt', 'r') 
  f.read() 
  htmlmarkdown=markdown.markdown(f)
  </code></pre>
  
  <p>I got the:</p>
  
  <blockquote>
    <p>AttributeError: 'file' object has no attribute 'strip'</p>
  </blockquote>
  
  <p>What I should do to make a success?</p>