pretty_print on a tree parsed with StringIO
Asked by
Schnito
Hello everybody,
I'm having someting strange here with pretty_print and StringIO.
Indeed, If I parse a file by first reading it and then call the StringIO of the result : tree = lxml.html.
Then, If I call the tostring method like this : lxml.html.
==> Then the result is not pretty printed ...
Whereas if I parse directly the file like this : tree = lxml.html.
==> Then the result of the tostring is pretty_printed ...
Would you have an idea for that ?
Thanks a lot !
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- lxml Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Schnito for more information if necessary.
To post a message you must log in.