You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey guys,
I have this gui.py file with tkinter for gui with buttons to call functions and the program when ran normally - works fine = gui window is opening with an empy chrome browser until I click a button that triggers a function and it moves to the right pages.
However when I run "pyinstaller --onefile gui.py" (with or without --windowed) and run the exe, it keeps opening infinite instances both of the gui and browser.
Googling a bit I saw this:
if name == 'main':
multiprocessing.freeze_support()
mainfunc()
so I just wrapped my logic in gui.py with mainfunc(), now when using pyinstaller, it really stops opening multiple gui instances but it keeps opening infinite chrome instances, pretty much confused as why this behavior happens with pyinstaller but not when I simply run my code..
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hey guys,
I have this gui.py file with tkinter for gui with buttons to call functions and the program when ran normally - works fine = gui window is opening with an empy chrome browser until I click a button that triggers a function and it moves to the right pages.
However when I run "pyinstaller --onefile gui.py" (with or without --windowed) and run the exe, it keeps opening infinite instances both of the gui and browser.
Googling a bit I saw this:
if name == 'main':
multiprocessing.freeze_support()
mainfunc()
so I just wrapped my logic in gui.py with mainfunc(), now when using pyinstaller, it really stops opening multiple gui instances but it keeps opening infinite chrome instances, pretty much confused as why this behavior happens with pyinstaller but not when I simply run my code..
Any ideas and help would be super appreciated.
Beta Was this translation helpful? Give feedback.
All reactions