call totem on sound file in python?

Im trying to use the python Popen function to play a sound file. However I cant find the file location for totem video player (default ubuntu video player). This is my code so far:

subprocess.Popen(['???','home/######/Desktop/python/programsIUse/alarm.wav'], shell=True)
0

1 Answer

This works for me with the sound file 'test.mp3' in the same directory as the python script.

import subprocess
filename = 'test.mp3'
totem = subprocess.Popen (['totem', filename])
1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like