simple text parser?
Michael Peuser
mpeuser at web.de
Sun Aug 17 06:38:09 EDT 2003
This is a little bit confusing.
(1) Do you want to dump "internal" data? Of course you cannnot expect those
data to be portabel between Python and C#!!!
(2) Do you have your data already converted to some standard ASCII format?
Then just write it into a textfile!
(3) Do you have a very special structure in mind to be serialized (i.e. list
of string - integer tuples; an "array of structs of a row of char and an
int" as you would say in C ;-))? Then you probably should store it in XML.
Lots of tools with Python, probably as many in C#
Kindly
Michael P
"Brandon J. Van Every" <vanevery at 3DProgrammer.com> schrieb im Newsbeitrag
news:bhng7f$16uiu$1 at ID-203719.news.uni-berlin.de...
> I'm making a 2D game with a simple "adjacent freeform territories" map. I
> need to make save files for this. I figure I could store the data in
either
> binary or text. The amount of data to be stored should be small enough
that
> efficiency and size do not matter. What does matter, is I don't want to
> spend any time at all on this. I want something off-the-shelf.
>
> Can anyone recommend simple text parsers implemented in Python?
>
> Alternately, doesn't Python have some kind of automagical serialization
> pack/unpack functionality? How does that work? I remember reading
> something about that in the Python docs awhile ago. Before you scream
RTFM,
> bear in mind that my current plan is to write versions of this game in C#
/
> .NET and Python / WhateverWidgets simultaneously. I'm ignorant of both
> platforms, this is an excuse to do a comparo. And, the whole point of
> moving to higher level language development is to minimize pain. Asking
> questions here rather than reinventing the wheel is part of that agenda.
I
> want to handle this problem off-the-shelf.
>
> --
> Cheers, www.3DProgrammer.com
> Brandon Van Every Seattle, WA
>
> 20% of the world is real.
> 80% is gobbledygook we make up inside our own heads.
>
More information about the Python-list
mailing list