This is the program:
import time
import subprocess
repeat=True
try:
subprocess.call("endtask.py", timeout=1, shell=True)
except:
repeat=True
def end():
try:
subprocess.call("end.m3u", timeout=1, shell=True)
except:
repeat=True
def sanskar():
try:
subprocess.call("sanskar.m3u", timeout=1, shell=True)
except:
repeat=True
def sabras():
try:
subprocess.call("sabras.m3u", timeout=1, shell=True)
except:
repeat=True
while repeat:
print("Which radio station would you like")
radio=input()
if radio=="1":
print("You Selected Sanskar")
sanskar()
elif radio=="2":
print("You Selected Sabras")
sabras()
elif radio=="0":
print("You Have Ended Playback")
end()
When i run it on windows it works and opens VLC when a number is slected. On the rasberry pi when the number is pressed it says for exams You Slected Sanskar, but does not go on to open any program. Any ideas?