#!/usr/bin/env python3 import sys import pathlib import os sys.path.append(str(pathlib.Path(__file__).absolute().parent.parent / 'src')) from nmreval.configs import check_for_config # does a directory for config stuff exist? create it if not check_for_config() # pyqtgraph warns on Mac if QApplication is created when it is imported # import pyqtgraph from nmreval.lib.logger import handle_exception sys.excepthook = handle_exception from gui_qt import App app = App(['Team Rocket FTW!']) from gui_qt.main.mainwindow import NMRMainWindow from gui_qt.lib.backup import Backup backuping = Backup() pid = os.getpid() files = backuping.search_unsaved() print(files) bck_name = backuping.create_entry(pid) print(sys.executable, sys.argv) app.aboutToQuit.connect(backuping.close) mplQt = NMRMainWindow() mplQt.show() sys.exit(app.exec())