title: Open file knowing only a part of its name
body: <p>I'm currently reading a file and importing the data in it with the line:</p>
  
  <pre><code># Read data from file.
  data = np.loadtxt(join(mypath, 'file.data'), unpack=True)
  </code></pre>
  
  <p>where the variable <code>mypath</code> is known. The issue is that the file <code>file.data</code> will change with time assuming names like:</p>
  
  <pre><code>file_3453453.data
  file_12324.data
  file_987667.data
  ...
  </code></pre>
  
  <p>So I need a way to tell the code to open the file in that path that has a name like <code>file*.data</code>, assuming that there will always be only <em>one</em> file by that name in the path. Is there a way to do this in <code>python</code>?</p>