Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #107763
| From | Ethan Furman <ethan@stoneleaf.us> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: Differences between Class(Object) and Class(Dict) for dictionary usage? |
| Date | 2016-04-27 23:12 -0700 |
| Message-ID | <mailman.176.1461823904.32212.python-list@python.org> (permalink) |
| References | (1 earlier) <57216EA8.4060600@gmail.com> <57217A2B.4060709@icloud.com> <57218905.5090807@gmail.com> <57218C42.5040804@icloud.com> <5721A9EA.1050205@stoneleaf.us> |
On 04/27/2016 09: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. If you are saving chess game state, you should look at the Portable Game Notation format: https://en.wikipedia.org/wiki/Portable_Game_Notation -- ~Ethan~
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: Differences between Class(Object) and Class(Dict) for dictionary usage? Ethan Furman <ethan@stoneleaf.us> - 2016-04-27 23:12 -0700
csiph-web