70
edits
Changes
From Gramps
→Examples
==== Examples ====
>>> html = Html('html')
>>> html
>>>
>>> html.tag = 'tail'
>>> html
>>>
>>> a = Html('a', href='http://cnn.org')
>>> a
>>>
>>> a.attr
'href="http://gramps-project.org"'
>>>
>>> a.attr += ' id="myhref"'
>>> a.attr
>>>
>>> del a.attr
>>> a.attr
>>>
>>> p = Html('p','This is a paragraph')
>>> p.inside
>>>
>>> p.inside = "This is a better paragraph"
>>> p.inside
>>>
>>> p.inside += ["THIS IS THE BEST PARAGRAPH!"]
>>> p.inside
>>>
>>> del p.inside
>>> p.inside
[]
>>> p