def csvheader(parent, nodelist):
 header = ''
 for subnode in nodelist:
  if (subnode.nodeType == subnode.ELEMENT_NODE):
   header = ((((header + ',') + parent) + '.') + subnode.tagName)
 return (header[1:] + '\n')

def csvheader ( parent , nodelist ) : header = '' for subnode in nodelist : if ( subnode . nodeType == subnode . ELEMENT_NODE ) : header = ( ( ( ( header + ',' ) + parent ) + '.' ) + subnode . tagName ) return ( header [ 1 : ] + '\n' )
gives the header for the csv @todo: deprecate .