DonJuma DonJuma - 5 months ago 27
Python Question

Can python open a mp3 file

Is it possible to open a mp3 file in python (possible using POPEN) and i dont mean to run it in the program i mean as a separate window in media player or whatever just for it to open it when i call the function and if so how. thanks a lot.

Answer

Opening a file with its associated application (Windows only):

import os
os.startfile('my_mp3.mp3')

A link to the documentation can be found here.

Comments