ElementTree and proper identation?

John Salerno johnjsal at NOSPAMgmail.com
Wed Sep 27 14:40:45 EDT 2006


John Salerno wrote:

> Ok, I see that indent() returns None. In that case, how do I get the 
> formatted text that it produces?

Ok, through the magic of sight I noticed that it is an inplace change, 
so I tried indent(root) and then wrote root to a file with ElementTree 
as normal. Very nice!



More information about the Python-list mailing list