0
Я передаю название песни к функции и не удается построить путь для omxplayerПередача название песни в omxplayer в питона
def PlayMusic(song):
#check if the process exists
is_pid = subprocess.call("pidof omxplayer.bin > /dev/null", shell=True)
if is_pid == 0:
return musicplaying("Song already Playing")
else:
pathsong ='/home/pi/'+song
os.system('omxplayer --no-keys -o local pathsong &')
return musicplaying (song +" playing")
Как я ставлю «pathsong» в командной строке omxplayer ?