Liam Clarke wrote: > What I need to do, is to turn this into a data structure, and I think > this relates to XML in a way. Basically, I want to parse the above (I > assume I'll be counting braces to find where I am) so that a country > object called ENG has a dictionary called ai, which points to lists, > integers, strings etc. and so forth. > > If anyone has any links to any (simple) examples of XML parsing or > similar which could give me pointers as to how to go about this, it'd be > much appreciated.
Take a look at pyparsing, I think it is the easiest Python parsing package. http://pyparsing.sourceforge.net/ Kent _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor