title: Get file path from askopenfilename function in Tkinter
body: <p>I am writing a script to automate changing a particular set of text in one file into a particular set in another with a different name.</p>
  
  <p>I want to get the name of the file using the <code>askopenfilename</code> function, but when I try to print the file name, it returns:</p>
  
  <p><code>&lt;_io.TextIOWrapper name='/home/rest/of/file/path/that/I/actually/need.txt' mode='w' encoding='ANSI_X3.4-1968'&gt;</code></p>
  
  <p>I need just the file name because the <code>&lt;_io.TextIOWrapper ...&gt;</code> is not sub scriptable.</p>
  
  <p>Any suggestions to remove the extraneous bits?</p>