I have 2 python files in the same directory. I have a menu that will call the 2nd python file to play a movie after choosing one. It is working fine up until I close the 2nd python file, I am not returning to my 1st python file, instead, it closes and it will finish the program. Is there a way to keep the first file open even if the user closes the second one?
in the first file in the menu i am running this function:
Thanks.
in the first file in the menu i am running this function:
def play_video(): stream = open("movie_player.py") read_file = stream.read() exec(read_file)Note: I tried to have the 2 python files not from same directory but still the same, it is closing the 1st py file!
Thanks.