'How do I open a file using a certain program?

I'm trying to open a video using VLC, and the only solution I came up with is using:

os.startfile("video.mp4")

and having VLC set as the default app for .mp4 files. How can I do the same thing without needing VLC as the default app?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source