![](https://secure.gravatar.com/avatar/8b97b5aad24c30e4a1357b38cc39aeaa.jpg?s=120&d=mm&r=g)
4 Feb
2009
4 Feb
'09
1:53 p.m.
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?
Apart from the already proposed XSLT serialisation, libxml2 does have a way to set the indentation level. However, that is done globally at a per-thread level and isn't currently exposed at lxml's API level. I'd accept patches that support it for a single call to ET.write() and tostring(). Stefan