Traversing sage's symbolic expression trees in python
I'm writing some python code around sage and I need to build an expression tree of the following basic form:
- each node represents an operation
- each child tree represents an expression tree to which the operation applies
Can anyone point me in the right direction as to how to traverse an instance of
sage.symbolic.expression.Expression, so as to extract this kind of semantic information?