Best way to have intermediate object description format

Paddy paddy3118 at netscape.net
Fri Nov 3 01:51:08 EST 2006


jm.suresh at no.spam.gmail.com wrote:
> Hi,
>  Is there any standard text format for storing data of object oriented
> nature.
>  The text file should be readable.
>
> That is, Is there any better way than having to write out a file like
> this from the original place and read it in python and process it.
>
> #----------------------------
> world = World(name='MyWorld')
> world.objects.append(Box(color='red'))
> world.objects.append(Circle(color='green'))
> world.someProp = "123"
> #-----------------------------
>
> Thanks.
> Suresh

XML ?
YAML ?
JSON ?
ConfigParser module ?
CSV file ?
UML ?

I'm finding it hard to be more specific, given your original post. so
just squirted some data formats that are supported by multiple
languages and can be used to transfer data between them.

P.S. I don't know why I put XML first :-)
P.P.S. And UML seems to be about pretty diagrams rather than a textual
format, but no doubt, with the size of the companies behind it, there's
probably a textual format hidden in their too.


- Paddy.




More information about the Python-list mailing list