diff options
| author | mailman | 1998-02-27 21:46:09 +0000 |
|---|---|---|
| committer | mailman | 1998-02-27 21:46:09 +0000 |
| commit | b17c7ece8124bc1bdbbec9b572aa70fabab5de0e (patch) | |
| tree | c33053e8b6411937538b32c2d6f8d06806856d68 /modules/htmlformat.py | |
| parent | c7587146ff05524acb98657cd946dd89e7091327 (diff) | |
| download | mailman-b17c7ece8124bc1bdbbec9b572aa70fabab5de0e.tar.gz mailman-b17c7ece8124bc1bdbbec9b572aa70fabab5de0e.tar.zst mailman-b17c7ece8124bc1bdbbec9b572aa70fabab5de0e.zip | |
Diffstat (limited to 'modules/htmlformat.py')
| -rw-r--r-- | modules/htmlformat.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/modules/htmlformat.py b/modules/htmlformat.py index ca2b2228a..e7b5051da 100644 --- a/modules/htmlformat.py +++ b/modules/htmlformat.py @@ -185,6 +185,7 @@ class Link: class FontSize: + """FontSize is being deprecated - use FontAttr(..., size="...") instead.""" def __init__(self, size, *items): self.items = list(items) self.size = size @@ -196,6 +197,23 @@ class FontSize: output = output + '</font>' return output +class FontAttr: + """Present arbitrary font attributes.""" + def __init__(self, *items, **kw): + self.items = list(items) + self.attrs = kw + + def Format(self, indent=0): + seq = [] + for k, v in self.attrs.items(): + seq.append('%s="%s"' % (k, v)) + output = '<font %s>' % string.join(seq, ' ') + for item in self.items: + output = output + HTMLFormatObject(item, indent) + output = output + '</font>' + return output + + class Container: def __init__(self, *items): |
