def __init__(self, *content, **attrs): from HTML import HEAD, HTML self.doctype = self.DOCTYPE self.body = apply(self.body_element, content, attrs) self.head = HEAD(self.generator) if hasattr(self, 'style'): self.head.append(self.style) if hasattr(self, 'title'): self.head.append(self.title) self.html = HTML(self.head, self.body) self.setup()