emitting HTML and XML in Python
alet at unice.fr
Wed Sep 27 14:26:06 CEST 2000
Kragen Sitaker wrote:
> In article <kuem2670hn.fsf at lasipalatsi.fi>,
> Erno Kuusela <erno-news at erno.iki.fi> wrote:
> >this looks quite similar to what Andy Dustman's HyperText package
> >produces. it lives at <URL:http://dustman.net/andy/python>.
> >maybe you should merge efforts?
> It is very similar; thanks for the pointer! The HyperText module is
> much more SGMLish (DTD-driven, upper-case, harder to adapt to new
> different DTDs), while what I posted is much more XMLish (stupid,
> simpleminded, lower-case); HyperText has many more features
> (DTD-drivenness, multiple content arguments, writeto, indented output,
> smart attribute name translation, entity-encoding, URL-encoding, form
> encoding, CSS styles, SGML comments, real documentation), and totals
> 1481 lines of .py, while what I posted totals 65.
> There might be times you'd want to use the stupid thing instead of the
> smart one.
Your module is very similar to the jaxml
(http://cortex.unice.fr/~jerome/jaxml/) module I've written, in fact you
use an even simpler solution than me, who didn't know the __call__
The main difference is that my module fully buffers its output, and
allows a different method to deeply imbricate tags.
I suppose I'll reuse parts of your code, thanks !
Jerome ALET - alet at unice.fr - http://cortex.unice.fr/~jerome
Faculte de Medecine de Nice - http://noe.unice.fr - Tel: 04 93 37 76 30
28 Avenue de Valombrose - 06107 NICE Cedex 2 - FRANCE
More information about the Python-list