title: How to read file stored in hdfs using python Open() method?
body: <p>I would like read a file from HDFS using Python <code>open()</code> method . However it is not working. Can someone give me a method to read hdfs file using Open() method in python.</p>
  
  <pre><code>for line in open("hdfs://namenode:54311/user/hadoop/filename.txt"):
  </code></pre>
  
  <p>However it gives me an error</p>
  
  <blockquote>
    <p>"IOError: [Errno 2] No such file or
    directory: 'hdfs://namenode:54311/user/hadoop/filename.txt'"</p>
  </blockquote>