I want to run a program on several platforms (including Mac OS), so I try to keep it as platform independent as possible. I use Windows myself, and I have a line os.startfile(file)
. That works for me, but not on other platforms (I read in the documentation, I haven't tested for myself).
Is there an equivalent that works for all platforms?
By the way, the file is a .wav
file, but I want users to be able to use their standard media player, so they can pause/rewind the file. That's why I use os.startfile()
. I might be able to work with libraries that also allow playing/pausing/rewinding media files.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…