code: def popup(self, title, callfn, initialdir=None, filename=None):
          
          self.cb = callfn
          filenames = QtGui.QFileDialog.getOpenFileNames(
              self.parent, title, initialdir, filename)
  
          # Special handling for PyQt5, see
          # https://www.reddit.com/r/learnpython/comments/2xhagb/pyqt5_trouble_with_openinggetting_the_name_of_the/
          if ginga.toolkit.get_toolkit() == 'qt5':
              filenames = filenames[0]
  
          all_paths = []
          for filename in filenames:
  
              # Special handling for wildcard or extension.
              # This is similar to open_files() in FBrowser plugin.
              if '*' in filename or '[' in filename:
                  info = iohelper.get_fileinfo(filename)
                  ext = iohelper.get_hdu_suffix(info.numhdu)
                  files = glob.glob(info.filepath)  # Expand wildcard
                  paths = ['{0}{1}'.format(f, ext) for f in files]
                  if self.all_at_once:
                      all_paths.extend(paths)
                  else:
                      for path in paths:
                          self.cb(path)
  
              else:
                  # Normal load
                  if self.all_at_once:
                      all_paths.append(filename)
                  else:
                      self.cb(filename)
  
          if self.all_at_once and len(all_paths) > 0:
              self.cb(all_paths)
docs: Let user select and load file(s). This allows wildcards and
          extensions, like in FBrowser.
  
          Parameters
          ----------
          title : str
              Title for the file dialog.
  
          callfn : func
              Function used to open the file(s).
  
          initialdir : str or `None`
              Directory for file dialog.
  
          filename : str
              Filter for file dialog.