py-simple-audio icon indicating copy to clipboard operation
py-simple-audio copied to clipboard

No direct support for path objects.

Open DragonRulerX opened this issue 4 years ago • 0 comments

I would find it more convenient to not have to cast a path object to a string to get this to work. Not sure if anyone else would agree?

import os
from pathlib import Path

DIR_BASE = Path(os.path.dirname(__file__)).parent
DIR_SOUNDS = Path(DIR_BASE, "sounds")

class Sounds:
	ERROR1 = WaveObject.from_wave_file(str(DIR_SOUNDS.joinpath("error1.wav"))) # works
	ERROR2 = WaveObject.from_wave_file(DIR_SOUNDS.joinpath("error2.wav")) # doesn't work

DragonRulerX avatar Dec 27 '21 21:12 DragonRulerX