title: Python: File not exists. Make sure of the right filename
body: <p>I am using code from one guy</p>
  
  <pre><code>import sys
  try:
      filename = sys.argv[1];
      represent_points = int(sys.argv[2]);
      delimeter = sys.argv[3];
      if (delimeter=="space"):
          delimeter = " ";
      if (delimeter=="tab"):
          delimeter = "\t";
      f = open(filename+".txt","r");
  except:
      sys.exit("File not exists. Make sure of the right filename");
  from string import *
  import degree_sampling
  degree_sampling.degree_sampling(filename,represent_points,delimeter);
  </code></pre>
  
  <p>But</p>
  
  <pre><code>milenko@milenko-HP-Compaq-6830s:~/KSCnet_Linux/Python_Code$ python trialrun.py datan 21
  File not exists. Make sure of the right filename
  </code></pre>
  
  <p>That is not true</p>
  
  <pre><code>milenko@milenko-HP-Compaq-6830s:~/KSCnet_Linux/Python_Code$ stat datan.txt
    File: ‘datan.txt’
    Size: 65          Blocks: 8          IO Block: 4096   regular file
  Device: 801h/2049d  Inode: 3670784     Links: 1
  Access: (0664/-rw-rw-r--)  Uid: ( 1000/ milenko)   Gid: ( 1000/ milenko)
  Access: 2016-04-08 10:54:23.695416155 -0300
  Modify: 2016-04-08 10:54:23.695416155 -0300
  Change: 2016-04-08 10:54:23.695416155 -0300
   Birth: -
  </code></pre>
  
  <p>What should I do?</p>