Generating HTML

S

Sebastian Bassi

Hello,

What are people using these days to generate HTML? I still use
HTMLgen, but I want to know if there are new options. I don't
want/need a web-framework a la Zope, just want to produce valid HTML
from Python.
Best,
SB.
 
D

Diez B. Roggisch

Sebastian said:
Hello,

What are people using these days to generate HTML? I still use
HTMLgen, but I want to know if there are new options. I don't
want/need a web-framework a la Zope, just want to produce valid HTML
from Python.

KID, Genshi, Mako. And a bazillion others. I prefer the first two ones
because the force you to use valid XML and produce HTML/XHMTL out of that.

Diez
 
S

Stefan Behnel

Sebastian said:
What are people using these days to generate HTML? I still use
HTMLgen, but I want to know if there are new options. I don't
want/need a web-framework a la Zope, just want to produce valid HTML
from Python.

There's also lxml.html, which has straight forward support for generating HTML
and comes with a lot of nice goodies for HTML handling:

http://codespeak.net/lxml/dev/lxmlhtml.html#creating-html-with-the-e-factory

Note that this requires lxml 2.0, which is currently in alpha status.

Stefan
 
J

Jon Rosebaugh

Hello,

What are people using these days to generate HTML? I still use
HTMLgen, but I want to know if there are new options. I don't
want/need a web-framework a la Zope, just want to produce valid HTML
from Python.
Best,
SB.

Other folks have suggested Mako, and that's an excellent option. But
I'd like to also suggest Brevé: a html DSL.

http://breve.twisty-industries.com/

html [
head [
title [ 'A Brevé Template' ]
],

body [
h1 [ 'Briefly, Brevé' ], br,
div ( style = 'text-align: center;' ) [
span [ '''
As you can see, Brevé maps very
directly to the final HTML output.
''' ]
]
]
]
 
N

Nikita the Spider

"Sebastian Bassi said:
Hello,

What are people using these days to generate HTML? I still use
HTMLgen, but I want to know if there are new options. I don't
want/need a web-framework a la Zope, just want to produce valid HTML
from Python.
Best,
SB.

Spyce. Works fine server side (like PHP) and also run from the command line.

http://spyce.sourceforge.net/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,252
Messages
2,571,267
Members
47,908
Latest member
MagdalenaR

Latest Threads

Top