On 04/27/2016 10:06 PM, Christopher Reimer wrote:
> On 4/27/2016 8:52 PM, Michael Torrie wrote:
>>   In fact if it were me I would save game state to some kind of ini file,
>> which would mean manually going through each object and writing out the
>> relevant data to the ini file using the right syntax. And then reverse
>> the process when restoring from a file.  XML could be another format
>> used for your file, if you're into that kind of thing.
> 
> Funny that you should mention the ini file. I wrote a ConfigParser class 
> for my const['whatever'] variable. It wouldn't take much to use that in 
> the meantime until I get a handle on pickle.

I'm not sure pickle is the way to go anyway.  Especially for your
purposes. Definitely you could make a ConfigParser that could read and
write your object instances.

-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to