[lxml-dev] altering the indent of the pretty output
Stefan Behnel
stefan_ml at behnel.de
Sun Feb 8 11:17:33 CET 2009
Ronny Pfannschmidt wrote:
> i'm currently porting gazpacho (a wysiwyg gtk ui file editor) to lxml,
> unfortunately the pretty printer prints with an indent of 2 and in order
> to match the convention i need an indent of 4
>
> is there any simple way to archive pretty dumping to a file with an
> indent of 4?
I just remembered that Fredrik has an indentation function for ElementTree:
http://effbot.org/zone/element-lib.htm
Most of the stuff on that page should work unchanged with lxml.etree.
Stefan
More information about the lxml-dev
mailing list