spotter . wrote:
Just thought I'd mention, since the split method returns a list, you could do:Very interesting ideas. The link will be handy for later use. For now, I have simply used this format :name;author;date;version;width;height and then use split(";") to move them into a list and assign it to variables then.
name,author,date,version,width,height = astr.split(";")
Yeah, as long as you don't expect any of your values to have semicolons in them. You could always use something strange like chr(245) as the separator, and it'd be less likely to occur in your values. But if you're the one defining these map files anyway, just make sure you don't use semicolons. And make sure you make a note of that if you give people the ability to make custom maps.Does this seem alright, no glaring things I have missed? It does seem to work from my small amount of testing that I have put it through.
Another alternative you could use is defining a Map class and pickling the instances.
-Lukeand Richard - you're right, of course. I didn't notice there weren't quotes.
