title: Browsing a file and displaying the file name using tkinter
body: <p>I am working with this code to browse a video file:</p>
  
  <pre><code>def openDirectory(): 
      vidname= tkFileDialog.askopenfile(parent=root, initialdir='/home/', title='Select your video:')
      pathlabel.config(text=os.path.basename(vidname),fg="blue")
  </code></pre>
  
  <p>But i am getting this error:</p>
  
  <pre><code>Exception in Tkinter callback
  Traceback (most recent call last):
  File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 1540, in __call__
  return self.func(*args)
  File "GUI_ubuntu.py", line 15, in openDirectory
  pathlabel.config(text=os.path.basename(vidname))
  File "/usr/lib/python2.7/posixpath.py", line 114, in basename
  i = p.rfind('/') + 1
  AttributeError: 'file' object has no attribute 'rfind'
  </code></pre>
  
  <p>Can you please help with this?</p>