forked from zietzm/Helmholtz_Test_Bench
25 lines
667 B
Python
25 lines
667 B
Python
from User_Interface import HelmholtzGUI
|
|
import cage_func as func
|
|
import traceback
|
|
import settings as g
|
|
|
|
try: # start normal operations
|
|
|
|
print("Starting setup...")
|
|
func.setup_axes() # initiate communication, set handles
|
|
|
|
print("\nOpening User Interface...")
|
|
|
|
g.app = HelmholtzGUI()
|
|
g.app.mainloop()
|
|
g.app = None # reset to None so nothing tries to print in the UI output
|
|
|
|
|
|
except BaseException as e: # if there is an error, print what happened
|
|
func.ui_print("\nAn error occurred, Shutting down.")
|
|
func.ui_print(e)
|
|
func.ui_print(traceback.print_exc())
|
|
|
|
finally: # safely shut everything down at the end
|
|
func.shut_down_all()
|