I'm trying to make a program that redirects the user to a HTML file after they have logged in. The redirecting part of the code works like this:
print("You have reached the end: Redirecting.")
url = ('test.html') # test.html is in the same folder as the program
webbrowser.open_new(url)
time.sleep(10)
Whenever I run the program, the HTML file opens, but when the program ends after ten seconds, the file exits. I've looked at the webbrowser documentation and tried many different variations, but I still can keep the file open after the program exits. Is there any command or anyway to keep the HTML file open?
(P.S. I'm using Visual Studio Code if that makes a difference.)
input()statement at the end of the script as a way to do this in the background.