Thats been a problem sometimes for myself as well, I've found it tricky to
get working at times. I'll try your approach next time I compile something
Chris, my own method involves using a small global function for getting
the absolute path when loading resources:
import sys
import os
box = pyglet.image.load(resource_path('picture.png'))
def resource_path(relative_path):
""" Get absolute path to resource, works for dev and for PyInstaller """
if hasattr(sys, '_MEIPASS'):
return os.path.join(sys._MEIPASS, relative_path)
return os.path.join(os.path.abspath("."), relative_path)
--
You received this message because you are subscribed to the Google Groups
"pyglet-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/pyglet-users.
For more options, visit https://groups.google.com/d/optout.