def fontifyPython(document):
 def matcher(node):
  return ((node.nodeName == 'pre') and node.hasAttribute('class') and (node.getAttribute('class') == 'python'))
 for node in domhelpers.findElements(document, matcher):
  fontifyPythonNode(node)

def fontifyPython ( document ) : def matcher ( node ) : return ( ( node . nodeName == 'pre' ) and node . hasAttribute ( 'class' ) and ( node . getAttribute ( 'class' ) == 'python' ) ) for node in domhelpers . findElements ( document , matcher ) : fontifyPythonNode ( node )
syntax color any node in the given document which contains a python source listing .