import sys from PyQt5 import QtCore, QtWidgets import sqlite3 import os.path import db.init import gui.window import arguments args = arguments.parser().parse_args() database = db.init.init(args.database if args.database != None else 'database') app = QtWidgets.QApplication(sys.argv) # # Allows to catch Ctrl-C event # timer = QtCore.QTimer() # timer.timeout.connect(lambda: None) # timer.start(100) window = gui.window.get(database) window.show() res = app.exec_() database.close() sys.exit(res)