On 28 May 2010 19:37, sshproxyuseonly <[email protected]> wrote:
> Dear Sir/Madam,
>
> Does pyglet support linux well? I just downloaded pyglet 10 minutes
> ago. and tried one simple test.
> I found out it can not support linux OS path well.
>
> I tried the following codes:
> (1) pyglet.resource.media('./audios/a.mp3')
> (2) pyglet.resource.media('/full/path/to/audios/a.mp3')
> (3) pyglet.resource.media('../upperdir/audios/a.mp3')
> (4) pyglet.resource.media('audios/a.mp3')
>
> (1), (2), (3) will give me pyglet.resource.ResourceNotFoundException:
> Resource was not found on the path. Ensure that the filename has the
> correct captialisation.
>
> only (4) works.
>
> I think python os module does handle all different platforms well. I
> haven't checked how pyglet handles it. why don't just call python os
> module for path?
>
> OS: openSUSE 11.2
> pyglet version: pyglet-1.1.4.tar.gz
> I just downloaded pyglet 10 minutes ago. should be the latest
> release.
>
> Thanks a lot for your time.
>
It's probably because you're using it wrong. If it's just some arbitrary
file then you should use pyglet.media.load, if it's packaged with your
program then you should set up a resource folder
http://www.pyglet.org/doc/programming_guide/application_resources.html
RTFM ;)
--
You received this message because you are subscribed to the Google Groups
"pyglet-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/pyglet-users?hl=en.