Entry 3154
pymarkup example
Submitted by anonymous
on Feb. 9, 2010 at 3:45 p.m.
Language: Python. Code size: 295 bytes.
import pymarkup as p spam = [p.e.Text('Welcome to TestSite.'), p.e.Image('/logo.png', 'logo', id='logo')] spam.append(p.e.Block(id='wrapper')) spam.append(p.e.Snippet('<p>This is a test!</p>', parent='wrapper')) eggs = [p.e.Title('Test')] print p.Markup(spam, eggs).render('xhtml')
This snippet took 0.00 seconds to highlight.
Back to the Entry List or Home.