I have a naive \"parser\" that simply does something like:
[x.split(\'=\') for x in mystring.split(\',\')]
However mystring can be something like<
Can you try this, it worked for me:
mystring = "foo=bar,breakfast=spam,eggs,e=a"
n = []
i = 0
for x in mystring.split(','):
if '=' not in x:
n[i-1] = "{0},{1}".format(n[i-1], x)
else:
n.append(x)
i += 1
print n
You get result like:
['foo=bar', 'breakfast=spam,eggs', 'e=a']
Then you can simply go over list and do what you want.