Skelington question

Hello people, only 9 hours to go till my first pyweek begins :) But enough with the pleasantries, I have a bit of a problem with the skelington, as I don't like the way data folder is in a different tree from the game logic...I like it when the data is in a folder in the game lib, thus easier to reach. I know there is a data.load function, but it returns file descriptors which are useless and I'm afraid to edit it so that the mighty pyweek gods won't bash me...So can I just ignore this part of the skelington, or is it a MUST?

(log in to comment)

Comments

Richard stated that those who are knowledgeable enough can edit it to there hearts content :)

BUT, if you by any chance leave anything out or the game folder does not look nice, then there will be no mercy for you.

Check Richards 3rd to last post in this thread:
http://pyweek.org/d/564/#comment-1098
I've added a function to data.py called filepath() which will return the path to the file rather than an open file object.
Hmm, I added it locally, so I think I won't reload...And I think I'll even hack it a bit more so that data will be a sublib. BTW - FIY you better changed that to just path, as the name you use implies that you can't use it with a directory. If your implementation doesn't allow directory joining, than I suggest you change it too, as it is important to some people too. Mikle :)
It's just a thin wrapper around os.path.join with some correct arguments. Nothing fancy ;)

I *am* tempted to raise a ValueError if you open a file that has different case to the file on disk. Would solve the #1 portability issue.

I was pretty aware of that, only I don't think there is a "good" way to solve this on Windows, except something like forcing lower-case or something...I'll just try and make my Ubuntu VM work, and hope pygame is really portable :) Mikle
If it works on Ubuntu it'll work everywhere. With one small caveat on OS X as given in the help page (or at least linked from that page).