Skip to content

Instantly share code, notes, and snippets.

@ZSchneidi
Created September 21, 2012 08:23
Show Gist options
  • Save ZSchneidi/3760363 to your computer and use it in GitHub Desktop.
Save ZSchneidi/3760363 to your computer and use it in GitHub Desktop.
for row in map_data.iter("row"):
i = 0
fgroup = 0
group = 0
for value in row.iter("value"):
if(i == 0):
fgroup = int(value.text)
if(i == 1):
group = int(value.text)
i+=1
if fgroup in tmp_device.group_map:
tmp_device.group_map[fgroup].extend([group])
else:
tmp_device.group_map[fgroup] = [group]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment