title: File not found Error in reading text in python
body: <p>I am trying to read a text file on my hard drive via python with the following script:</p>
  
  <pre><code>fileref = open("H:\CloudandBigData\finalproj\BeautifulSoup\twitter.txt","r")
  </code></pre>
  
  <p>But it is giving the following error:</p>
  
  <pre><code>IOError                                   Traceback (most recent call last)
  &lt;ipython-input-2-4f422ec273ce&gt; in &lt;module&gt;()
  ----&gt; 1 fileref = open("H:\CloudandBigData\finalproj\BeautifulSoup\twitter.txt","r")
  
  IOError: [Errno 2] No such file or directory: 'H:\\CloudandBigData\x0cinalproj\\BeautifulSoup\twitter.txt'
  </code></pre>
  
  <p>I also tried with other way:</p>
  
  <pre><code>with open('H:\CloudandBigData\finalproj\BeautifulSoup\twitter.txt', 'r') as f:
      print f.read()
  </code></pre>
  
  <p>Ended up with the same error. The text file is present in the directory specified.</p>