code: def on_btn_unpack(self, event):
          
          dlg = wx.FileDialog(
              None, message = "choose txt file to unpack",
              defaultDir=self.WD,
              defaultFile="",
              style=wx.FD_OPEN #| wx.FD_CHANGE_DIR
              )
          if dlg.ShowModal() == wx.ID_OK:
              FILE = dlg.GetPath()
              input_dir, f = os.path.split(FILE)
          else:
              return False
  
          outstring="download_magic.py -f {} -WD {} -ID {} -DM {}".format(f, self.WD, input_dir, self.data_model_num)
  
          # run as module:
          print("-I- running python script:\n %s"%(outstring))
          wait = wx.BusyInfo("Please wait, working...")
          wx.SafeYield()
          ex = None
          try:
              if ipmag.download_magic(f, self.WD, input_dir, overwrite=True, data_model=self.data_model):
                  text = "Successfully ran download_magic.py program.\nMagIC files were saved in your working directory.\nSee Terminal/message window for details."
              else:
                  text = "Something went wrong.  Make sure you chose a valid file downloaded from the MagIC database and try again."
  
          except Exception as ex:
              text = "Something went wrong.  Make sure you chose a valid file downloaded from the MagIC database and try again."
              del wait
              dlg = wx.MessageDialog(self, caption="Saved", message=text, style=wx.OK)
              result = dlg.ShowModal()
              if result == wx.ID_OK:
                  dlg.Destroy()
              if ex:
                  raise(ex)
          self.contribution = cb.Contribution(self.WD)
docs: Create dialog to choose a file to unpack
          with download magic.
          Then run download_magic and create self.contribution.