Hi,<br><br><div class="gmail_quote">On Fri, May 29, 2009 at 2:09 AM, Gary Herron <span dir="ltr"><<a href="mailto:gherron@islandtraining.com">gherron@islandtraining.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div></div><div class="h5">Marius Retegan wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hello<br>
I have simple text file that I have to parse. It looks something like<br>
this:<br>
<br>
parameters1<br>
     key1 value1<br>
     key2 value2<br>
end<br>
<br>
parameters2<br>
     key1 value1<br>
     key2 value2<br>
end<br>
<br>
So I want to create two dictionaries parameters1={key1:value1,<br>
key2:value2} and the same for parameters2.<br>
<br>
I would appreciate any help that could help me solve this.<br>
Thank you<br>
  <br>
</blockquote>
<br></div></div>
This looks like a homework problem. </blockquote><div><br>It's not. I'm passed homework age.<br> <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
  But even if it's not, you are not likely to find someone who is willing to put more work into this problem than you have. <br>
So  why don't you show us what you've tried, and see if someone is willing to make suggestions or answer specific question about your attempt at a solution?<br><font color="#888888">
</font></blockquote><div><br>I don't now if posting a code that gets into a while loop and never stops would demonstrate to you that I've tried. Be assured that before posting to the list I did try to solve it myself, because I knew that I might get an answer like RTFM or similar. <br>
Maybe I'm not smart enough, but I can't make python to start reading after the "parameter1" line and stop at the "end" line. That's all I want a small piece of pseudocode to do just that.<br>
<br>Thanks<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><font color="#888888"><br>
Gary Herron<br>
</font></blockquote></div><br>