Is there a way to pass an argument in Pygame using "pygame.image.load" without the source folder having to be in the C drive, or the scripts and images to be in the C drive?
I have tried many different things and spent much of this weekend trying to figure it out. I've searched over other stackoverflow Q&As and haven't gotten anywhere.
I have tried using "os.path.join", "os.path.normpath", and the like, and I still haven't figured it out.
Here's the code:
import os, pygame
load_image = pygame.image.load(os.path.join('\\test', 'energy.png'))
And it works fine as long as the "test" folder is located in C:\, but as soon as I move it to any other location I get the ol' pygame.error: Couldn't open \test\energy.png error.
Basically what I'm asking is: Is there anyway to get a Pygame script (specifically the pygame.image.load code) to work without having the folder, script, and images all located in C:\?
Eventually I want to make a cx_freeze app of the game I'm working on, and I want the user to be able to place the folder in any location he desires.
I'm using Python 3.3 on a Windows 7 laptop. Thanks.