How about this?

for line in file:
    # ignore lines without = assignment
    if '=' in line:
        property, value = line.strip().split( '=', 1 )
        property = property.strip().lower()
        value = value.strip()

        # do something with property, value

Malcolm
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to