from User_Interface import HelmholtzGUI import cage_func as func import traceback try: # start normal operations print("Starting setup...") func.setup_axes() # initiate communication, set handles print("\nOpening User Interface...") '''g.TestValuesX = ui.TestValues() g.TestValuesY = ui.TestValues() #g.TestValuesZ = ui.TestValues() g.TestValues = [g.TestValuesX, g.TestValuesY]#, g.TestValuesZ]''' application = HelmholtzGUI() application.mainloop() except BaseException as e: # if there is an error, print what happened print("\nAn error occurred, Shutting down.") print(e) print(traceback.print_exc()) finally: # safely shut everything down at the end func.shut_down_all()