title: How to make Tkinter File Dialog only display text files?
body: <p>I want to control what files the Tkinter file dialog displays to the user. I only want the user to be able to see text files, instead of seeing all of the different types of files such as Word or PowerPoint documents.</p>
  
  <p>Is there a way to specify the file type within the <code>askopenfilename()</code> function?</p>
  
  <p><strong>Edit</strong></p>
  
  <p>I tried to use this code</p>
  
  <pre><code>filename=tkFileDialog.askopenfilename(filetypes='txt')
  </code></pre>