'Prints a warning to the error stream.'

def warn(self, message, node=None):

    if ((node is not None) and hasattr(node, 'source')):
        (filename, lineno) = self.get_location(*node.source)
        message = ('[%s:%d]    %s' % (filename, lineno, message))
    print >>self.error_stream, message
