rendered paste body def addFiles(self): """Event handler for adding files to the list box""" self.tk.call('namespace', 'eval', '::tk::dialog::file::{', 'variable', 'showHiddenBtn', 1, '}') self.tk.call('namespace', 'eval', '::tk::dialog::file::{', 'variable', 'showHiddenVar', 0, '}') self.tk.call('set', '::tk::dialog::file::showHiddenBtn', '1') self.tk.call('set', '::tk::dialog::file::showHiddenVar', '0') files = tkFileDialog.askopenfilenames(parent=self, title='Add files') for file in files: log.debug("Adding '%s' to the file list" % file) self.lstFiles.insert('end', file) # Add a dummy title (with pathname and extension removed) title = os.path.basename(file)[0:-4] self.lstMapped.insert('end', title) self.updateUsage() self.syncFilesList()