def on_downloads(self): self.hide() self.ui.lwFiles.clear() cfg = Configs() if not os.path.exists(cfg.downloads_path()): QtGui.QMessageBox.warning(self, 'Ошибка', 'Нет загруженных файлов!', QtGui.QMessageBox.Yes) return if platform.system() == "Linux": for mngr in cfg.file_managers(): if os.path.exists("".join(("/usr/bin/", mngr))): subprocess.call("".join((mngr, " ", cfg.downloads_path())), shell=True) break else: import win32api win32api.ShellExecute(0, 'open', cfg.downloads_path(), '', '', 1)