[Solved] python code doesn’t work correctly after compiling with pyinstaller


I think you need to edit tpopup.py so that it has the setup of whatever you need to do for setup like you had:

# your setup code goes where it was here

Then, put the rest of the code into a function, say for example:

def open_popup(maybe_with_arguments):
    # rest of the code here

And then in tcountdown, you can use

import tpopup # with import, you don't need to compile tpopup - you just need to make sure it's in the same directory as tcountdown.py and pyinstaller should notice it and pack it into the .exe
import time
time.sleep(10) # waiting
tpopup.open_popup(possible_arguments) # calls the code that actually calls the popup, opening the popup AFTER the wait has been completed.

solved python code doesn’t work correctly after compiling with pyinstaller