human
for window to popup before main window closes.
assistant
Here is a Python function to allow windows to pop up before the main window closes

import time

def window_to_popup():
    """
    This function will popup a window before main window closes.
    """
    print("Window to popup before main window closes")

# Enter the time
time_now = time.time()

# Calling the function
print((window_to_popup()))

# Print the time
print(("Time now: ", time_now))

#Example Output
# Window to popup before main window closes
# None
# ('Time now: ', 1673846540.1364734)

#Remember to inspect code for bugs.