parse a string of parameters and values

bsneddon bsneddon at
Sun Dec 13 01:16:32 CET 2009

I have a problem that I can come up with a brute force solution to
solve but it occurred to me that there may be an
 "one-- and preferably only one --obvious way to do it".

I am going to read a text file that is an export from a control
It has lines with information like

base=1 name="first one" color=blue

I would like to put this info into a dictionary for processing.
I have looked at optparse and getopt maybe they are the answer but
there could
be and very straight forward way to do this task.

Thanks for your help

More information about the Python-list mailing list