So I have a loop executing video files on VLC. I want to make an executable file (.bat or .py I don't care) for running this code
for video in list:
subprocess.run([vlc,'--play-and-exit','-f', video], shell=True)
I want the user to be able to interrupt this without ctrl+C (which only works if vlc is closed which also is a problem, because it is only closed for like 0.1 seconds)
I tried with a flag controlled by a button, but it does not work because vlc must be closed to control the flag (same problem as ctrl+c)
for video in list:
subprocess.run([vlc,'--play-and-exit','-f', video], shell=True)
if flag:
break
I don't want to close the program window to stop running the program