[gcompris-devel] gnumch localisable "yummy yummy" - filepath
Fòram na Gàidhlig
fios at foramnagaidhlig.net
Mon May 13 12:24:15 UTC 2013
My question: How to I find out the gcompris install directory in a
Python module? I expect that something has already been programmed for
this, but I just can't find it.
I am working on:
/ src / gnumch-equality-activity / gnumch.py
And I want to make eat.wav localisable.
I could simply call:
gcompris.sound.play_ogg("voices/$LOCALE/misc/eat.ogg")
However, if the file is not there, it won't play anything. So, I need to
check if the file is there in order to play the default sound instead if
it's not.
This can be done with os.path.isfile(), but I need to specify the full
absolute path for this.
More information about the Gcompris-devel
mailing list