title: .read() returns "unicode object has no attribute read" in python with askopenfilename()
body: <p>I'm trying to make an import function for scrolledText in Python's Tkinter, but when reading the file, an AttributeError is raised. Code:</p>
  
  <pre><code>def open_command():
      openfile = tkFileDialog.askopenfilename()
      if openfile != None:
          contents = openfile.read()
          textPad.delete('1.0', END)
          textPad.insert('1.0', contents)
          openfile.close()
  </code></pre>
  
  <p>Error:</p>
  
  <pre><code>    contents = openfile.read()
  AttributeError: 'unicode' object has no attribute 'read'
  </code></pre>
  
  <p>I want to clarify that 'textPad' refers to a 'ScrolledText' object.
  Does anyone know why this is happening? at first I thought the error may be coming from encoding, so I encoded in UTF-8 but it still returned the same error. Thanks in advance!</p>