I am seeing the error irrespective of what path I provide
none of these paths work:
'content\Sprites\Player'
'content/Sprites/Player'
nor these:
'content\\Sprites\Player'
'content//Sprites/Player'
more importantly how am I supposed to provide path of subdirs?
and is there an issue with windows path for the pyglet.resource.reindex()
method?
thanks
Rudra
On Thu, Mar 12, 2009 at 2:12 PM, Alex Holkner <[email protected]>wrote:
>
> On Fri, Mar 13, 2009 at 2:52 AM, Rudy <[email protected]> wrote:
> >
> > Hi ll,
> > I am trying to develop game using Cocos2d game library ; that in turn
> > uses pyglet library.
> > Setup :
> > python 2.5.4
> > pyglet 1.1.2
> > cocos2d-0.3.0
> > on Windows Vista Home Premium (32 bit).
> > I try to add my content subdirs as resource path in pyglet like this:
> >
> > pyglet.resource.path= ['content//Sprites/Player']
> > pyglet.resource.reindex()
> >
> > I keep getting this error :
> > File "C:\Python25\lib\site-packages\pyglet\resource.py", line 324, in
> > reindex
> > 'Backslashes not permitted in relative path'
>
> I'll assume that you have a typo above in your resource.path (which as
> printed doesn't actually contain any backslashes).
>
> The error message is displayed to force you to use forward slashes in
> place of backslashes, to ensure your program is cross-platform.
> Backslashes are valid path separators only on Windows, whereas forward
> slashes work everywhere (including windows).
>
> Looking at the code now, I'm not sure why it doesn't just replace the
> slash itself...
>
> Alex.
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---