I'm probably dense, but I don't understand the "end user" reasoning. When I'm developing I'm running as the end user in nearly all cases, with the exception of unit tests, and I'm rarely unit testing code that loads resources, though even if I were I'd probably want to scaffold that sort of thing away anyhow, since it wouldn't be the point of the tests since its part of the library.
I personally find that if I'm developing in a significantly different environment from what I expect the "end user" to use, it's pretty much guaranteed that it won't work in the end user environment at all. -Casey On Sat, Mar 6, 2010 at 5:38 PM, Tristam MacDonald <[email protected]> wrote: > On Sat, Mar 6, 2010 at 7:40 PM, Greg Ewing <[email protected]> > wrote: >> >> Richard Jones wrote: >> >>> Sure, but how does pyglet's resource module know where the program's >>> code is? The only thing pyglet knows is the location of __main__ which >>> is *probably* the right place. >> >> Exactly. That would be a much better thing to use as a >> default than the cwd. > > It is a better thing from the perspective of an end user, sure. I am not > sure it is such a good option from a developer perspective, as one tends to > need to run applications in simulated contexts. GLFW does what you are > suggesting by default, and it causes no end of headaches when developing. >> >> This is more or less what I do in my albow library, and >> it works fine. > > It isn't hard for the application using pyglet to do this, if you feel the > need. Just set the resource path to whatever you want, and tell the resource > module to update. > -- > Tristam MacDonald > http://swiftcoder.wordpress.com/ > > -- > 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. > -- 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.
