title: wxPython: Dragging a file into window to get file path
body: <p>I want to drag a file into a window and get the file path. I've tried doing this: </p>
  
  <pre><code>class CSVDropper(wx.FileDropTarget):
    def __init__(self, data):
        wx.FileDropTarget.__init__(self)
        self.data = data
  
    def OnDropFiles(self, x, y, filenames):
        self.data = filenames
        print self.data
  </code></pre>
  
  <p>then in the main window:</p>
  
  <pre><code>    # Drag &amp; Drop
      self.csv_path = None
      self.drop_table = CSVDropper(self.csv_path)
  
      self.SetDropTarget(self.drop_table)
  </code></pre>
  
  <p>But this does nothing. I've tried running <a href="http://wiki.wxpython.org/DragAndDrop" rel="noreferrer">this</a> tutorial code, but it doesn't do anything either. How do I accomplish this?</p>