Skip to content

Commit

Permalink
Move freeze support to very top level.
Browse files Browse the repository at this point in the history
From now on, to start the GUI from `PyCharm` run the `release/src/runPytrnsysGui.py`
script.
  • Loading branch information
zuckerruebe committed Oct 26, 2023
1 parent 0990ec7 commit 75c099a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
10 changes: 9 additions & 1 deletion release/src/runPytrnsysGui.py
Original file line number Diff line number Diff line change
@@ -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()
10 changes: 0 additions & 10 deletions trnsysGUI/gui.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import logging as _log
import multiprocessing as _mp
import pathlib as _pl
import sys as _sys

Expand Down Expand Up @@ -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()

0 comments on commit 75c099a

Please sign in to comment.