XML Python can this be improved
Use for in loops to avoid repetition

These 3 blocks of code are very similar:

1

    clist=node.getElementsByTagName('channel')
    for c in clist:
            print c.childNodes[0].nodeValue


2

    glist=node.getElementsByTagName('gpio')
    for g in glist:
            print g.childNodes[0].nodeValue


3

    colist=node.getElementsByTagName('cont')
    for co in colist:
            print co.childNodes[0].nodeValue




We can clean up by abstracting what is different (the name) into a loop variable:

for name in ('channel', 'gpio', 'cont'):
    for element in node.getElementsByTagName(name):
        print element.childNodes[0].nodeValue


Now also adding another name will lead to only adding it to the list instead of repeating similar code the fourth time.