What I'm trying to do here is select multiple files from within a wxPython frame app and then utilize those file paths within another function within the same wxPython app. I realize I can use the following code to select multiple files:

```
def OnOpen(self,e)
   dialog = wx.FileDialog(self, "Choose a file", "", "", "*.", wx.MULTIPLE)
   if dialog.ShowModal() == wx.ID_OK:
      filelist = dialog.GetPaths()

```

So the 'filelist' variable is now a list of the files the user selects. However, I can't seem to find a way to utilize this list in another function. I was hoping I could just use a return statement within this function in another function and assign it to a variable, but it doesn't seem to allow me to do this. I guess this is because I have a button event already using this function. Any help on this would be greatly appreciated.