Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No direct support for path objects. #59

Open
DragonRulerX opened this issue Dec 27, 2021 · 0 comments
Open

No direct support for path objects. #59

DragonRulerX opened this issue Dec 27, 2021 · 0 comments

Comments

@DragonRulerX
Copy link

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant