diff --git a/release/src/runPytrnsysGui.py b/release/src/runPytrnsysGui.py index b8bf530b..37110558 100644 --- a/release/src/runPytrnsysGui.py +++ b/release/src/runPytrnsysGui.py @@ -1,3 +1,11 @@ +import multiprocessing as _mp + import trnsysGUI.gui as _gui -_gui.main() +if __name__ == "__main__": + # Support freezing using PyInstaller, see + # https://github.com/pyinstaller/pyinstaller/wiki/Recipe-Multiprocessing and + # https://docs.python.org/3/library/multiprocessing.html#multiprocessing.freeze_support + _mp.freeze_support() + + _gui.main() diff --git a/trnsysGUI/gui.py b/trnsysGUI/gui.py index afc92c4b..1283d16f 100644 --- a/trnsysGUI/gui.py +++ b/trnsysGUI/gui.py @@ -1,5 +1,4 @@ import logging as _log -import multiprocessing as _mp import pathlib as _pl import sys as _sys @@ -81,12 +80,3 @@ def exceptionHook(exceptionType, value, traceback): _sys.exit(-1) _sys.excepthook = exceptionHook - - -if __name__ == "__main__": - # Support freezing using PyInstaller, see - # https://github.com/pyinstaller/pyinstaller/wiki/Recipe-Multiprocessing and - # https://docs.python.org/3/library/multiprocessing.html#multiprocessing.freeze_support - _mp.freeze_support() - - main()