def open_plot_folder(self): f_next, _ = os.path.splitext(str(self.ui.edit_file.text())) plot_folder = os.path.join(f_next, 'plots') QDesktopServices.openUrl(QUrl(plot_folder))