John Salerno wrote:
> John Salerno wrote:
>> Yeah, actually I just gave this a try but I couldn't figure out where
>> the code needed to go or how to call the function. I tried creating an
>> Element with a few SubElements, then I did:
>>
>> print >> filename, indent(root)
>>
>> But that only wr
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!
--
John Salerno wrote:
> Fredrik Lundh wrote:
>> John Salerno wrote:
>>
>>> Well, further research reveals that this function isn't available yet
>>> in any version.
>>
>> what keeps you from using the source code on the page you're talking
>> about ?
>>
>>
>>
>
> Yeah, actually I just gave this a
Fredrik Lundh wrote:
> John Salerno wrote:
>
>> Well, further research reveals that this function isn't available yet
>> in any version.
>
> what keeps you from using the source code on the page you're talking
> about ?
>
>
>
Yeah, actually I just gave this a try but I couldn't figure out w
John Salerno wrote:
> John Salerno wrote:
> > I've been doing a little studying of ElementTree and it doesn't seem
> > very satisfactory for writing XML files that are properly
> > formatted/indented. I saw on the website that there is an
> > indent/prettyprint function, but this isn't listed in th
John Salerno a écrit :
> I've been doing a little studying of ElementTree and it doesn't seem
> very satisfactory for writing XML files that are properly
> formatted/indented. I saw on the website that there is an
> indent/prettyprint function, but this isn't listed in the Python docs
> and I did
John Salerno wrote:
> Well, further research reveals that this function isn't available yet in
> any version.
what keeps you from using the source code on the page you're talking about ?
--
http://mail.python.org/mailman/listinfo/python-list
John Salerno wrote:
> I've been doing a little studying of ElementTree and it doesn't seem
> very satisfactory for writing XML files that are properly
> formatted/indented. I saw on the website that there is an
> indent/prettyprint function, but this isn't listed in the Python docs
> and I didn
I've been doing a little studying of ElementTree and it doesn't seem
very satisfactory for writing XML files that are properly
formatted/indented. I saw on the website that there is an
indent/prettyprint function, but this isn't listed in the Python docs
and I didn't see it after doing a dir(),