mirror of
https://gitlab.os-k.eu/neox/CNIRevelator.git
synced 2023-08-25 14:03:10 +02:00
Update CNIRLauncher.py
This commit is contained in:
parent
6793974411
commit
dafe98a347
@ -32,33 +32,38 @@ import traceback
|
|||||||
import updater # updater.py
|
import updater # updater.py
|
||||||
import ihm # ihm.py
|
import ihm # ihm.py
|
||||||
import globs # globs.py
|
import globs # globs.py
|
||||||
from globs import logfile
|
import logger # logger.py
|
||||||
|
|
||||||
## Main function
|
## Global Handlers
|
||||||
|
logfile = logger.logCur
|
||||||
|
launcherWindow = ihm.launcherWindowCur
|
||||||
|
|
||||||
|
## Main function
|
||||||
def main():
|
def main():
|
||||||
|
|
||||||
# Starting the main update thread
|
# Starting the main update thread
|
||||||
mainThread.start()
|
mainThread.start()
|
||||||
|
|
||||||
# Hello world
|
# Hello world
|
||||||
logfile.printdbg('*** CNIRLauncher LOGFILE. Hello World ! ***')
|
logfile.printdbg('*** CNIRLauncher LOGFILE. Hello World ! ***')
|
||||||
logfile.printdbg('Files in directory : ' + str(os.listdir(globs.CNIRFolder)))
|
#logfile.printdbg('Files in directory : ' + str(os.listdir(globs.CNIRFolder)))
|
||||||
|
|
||||||
# Hello user
|
# Hello user
|
||||||
launcherWindow = ihm.LauncherWindow()
|
|
||||||
|
|
||||||
launcherWindow.progressBar.configure(mode='indeterminate', value=0, maximum=20)
|
launcherWindow.progressBar.configure(mode='indeterminate', value=0, maximum=20)
|
||||||
launcherWindow.mainCanvas.itemconfigure(launcherWindow.msg, text='Chalut!')
|
launcherWindow.mainCanvas.itemconfigure(launcherWindow.msg, text='Starting...')
|
||||||
launcherWindow.progressBar.start()
|
launcherWindow.progressBar.start()
|
||||||
|
|
||||||
launcherWindow.mainloop()
|
launcherWindow.mainloop()
|
||||||
|
|
||||||
## Bootstrap
|
logfile.printdbg('*** CNIRLauncher LOGFILE. Goodbye World ! ***')
|
||||||
|
return
|
||||||
|
|
||||||
|
## Bootstrap
|
||||||
try:
|
try:
|
||||||
mainThread = threading.Thread(target=updater.umain, daemon=True)
|
mainThread = threading.Thread(target=updater.umain, daemon=False)
|
||||||
main()
|
main()
|
||||||
except Exception:
|
except Exception:
|
||||||
logfile.printerr("A FATAL ERROR OCCURED : " + str(traceback.format_exc()))
|
logfile.printerr("A FATAL ERROR OCCURED : " + str(traceback.format_exc()))
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
Loading…
Reference in New Issue
Block a user