extract to dictionaries

Marius Retegan marius.s.retegan at gmail.com
Thu May 28 19:03:45 EDT 2009


Hello
I have simple text file that I have to parse. It looks something like
this:

parameters1
     key1 value1
     key2 value2
end

parameters2
     key1 value1
     key2 value2
end

So I want to create two dictionaries parameters1={key1:value1,
key2:value2} and the same for parameters2.

I woud appreciate any help that could help me solve this.
Thank you




More information about the Python-list mailing list