def run(): try: ui = Ui() except ValueError as ve: print(ve) return ui.run()
from ui import Ui from controller import Controller from repo import Repo repo = Repo() controller = Controller(repo) c = Ui(controller) c.run()
import sys import time import traceback from threading import Lock import memhook from ui import Ui l = Lock() h = memhook.Hook() ui = Ui(h) def exhook(*args): with l: with open("error.txt", 'a') as f: f.write(f"{'#' * 20} {time.asctime()} {'#' * 20}\n") f.writelines(traceback.format_exception(*args)) f.write('\n\n') ui.on_error(*args) sys.excepthook = exhook ui.run()
from ui import Ui if __name__ == "__main__": temp = Ui(debug=False, midiController="Launch Control MIDI 1", midiInput="Elektron Digitakt MIDI 1", midiOutput="USB MIDI Interface") temp.run()