arthuro555
Posts: 10
Joined: Mon Aug 27, 2018 11:57 am

Music on python

Thu Oct 18, 2018 9:40 am

Is it possible to play music with python, without executing a linux command like os.something(omxplayer data.mp3), like a library that have music.play(), music.pause(), music.file(), music.playlist.play(), music.playlist.pause(), music.playlist.file(), music.playlist.next(), etc.


arthuro555
Posts: 10
Joined: Mon Aug 27, 2018 11:57 am

Re: Music on python

Thu Oct 18, 2018 10:14 am

thanx it's exactly what I was looking for.

Danneskjold_
Posts: 1
Joined: Fri Oct 26, 2018 11:18 am

Re: Music on python

Fri Oct 26, 2018 11:23 am

Hii I am trying to make a motion sensor and when it detects a motion it should be playing the music.
I used this code...

from subprocess import call
file = "/pi/Desktop/file.mp3"
call(["vlc", file])

Everything happens perfectly although when vlc starts it says that the directory...

Return to “Python”