It looks like pptree does not preserve ordering of child elements. I wrote a naive "tree" view by iterating recursively through node.children and get this, correct ordering:
vs
I expect this is because we take the 1/2 of the number of children, and put half above the line and half below the line. All that needs to change is the reverse-order (or un-reverse-order?) of the "after" children to get a correctly-ordered result.
It looks like
pptreedoes not preserve ordering of child elements. I wrote a naive "tree" view by iterating recursively throughnode.childrenand get this, correct ordering:vs
I expect this is because we take the 1/2 of the number of children, and put half above the line and half below the line. All that needs to change is the reverse-order (or un-reverse-order?) of the "after" children to get a correctly-ordered result.