Pygame: os.path.join() broke
After updating SDL framework on Mac OSX 10.8.4 to fix fullscreen issues on
the mac my images no longer load. Mostly just look at the top part of the
function.
def load_image(name, colorkey=None):
fullname = os.path.join('images',name)
try:
image = pygame.image.load(fullname) # Tries loading image
except pygame.error, message: # If image load fails
print "Cannot load image: ", fullname# return error to console
raise SystemExit, message
image = image.convert_alpha()
if colorkey is not None:
if colorkey is -1:
colorkey = image.get_at((0,0))
image.set_colorkey(colorkey, RLEACCEL)#new alpha value
return image, image.get_rect()
This worked before the update but no longer does. Tried searching around
and even updating again to no avail. I also tried...
fullname = os.path.join(os.sep, 'images',name)
...and then one image works then the second one does not. All folders and
image names were tripled checked. I even changed the names and folders
around still with no luck. Any other ideas?
No comments:
Post a Comment