On Sun, Nov 11, 2012 at 6:01 AM, Marc <m...@marcd.org> wrote:

> **
>
> Hello,
>
> I am trying to parse a text file with a structure that looks like:
>
> [record: Some text about the record]
>
>         Attribute 1 = Attribute 1 text
>
>         Attribute 3 = Attribute 3 text
>
>         Attribute 4 = Attribute 4 text
>
>         Attribute 7 = Attribute 7 text
>
> [record: Some text about the record]
>
>         Attribute 1 = Attribute 1 text
>
> <SNIP>
>
> Etc…for many hundreds of records
>

It looks like a Config or INI file to me.  It is worth a try to see if
configparser is able to process the file, if it can you have a solution, if
not you only wasted a few minutes trying.

>  <SNIP>
>
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to