(self, start_node=None)
return str_buff
Return the pre order expression string of the Tree, used
        to python *eval*.

        :rtype: the expression string
Return the pre order expression string of the Tree, used
        to python *eval*.
Return the pre order expression string of the Tree used to python * eval * .
def getPreOrderExpression(self, start_node=None):
        """ Return the pre order expression string of the Tree, used
        to python *eval*.

        :rtype: the expression string
        """
        if start_node is None:
            start_node = self.getRoot()

        str_buff = start_node.getData()

        if not start_node.isLeaf():
            all_childs = start_node.getChilds()
            str_buff += "(" + self.getPreOrderExpression(all_childs[0])

            for index in xrange(1, len(all_childs)):
                child = all_childs[index]
                str_buff += ", " + self.getPreOrderExpression(child)
            str_buff += ")"

        return str_buff
def getPreOrderExpression ( self , start_node = None ) : if start_node is None : start_node = self . getRoot ( ) str_buff = start_node . getData ( ) if not start_node . isLeaf ( ) : all_childs = start_node . getChilds ( ) str_buff += "(" + self . getPreOrderExpression ( all_childs [ 0 ] ) for index in xrange ( 1 , len ( all_childs ) ) : child = all_childs [ index ] str_buff += ", " + self . getPreOrderExpression ( child ) str_buff += ")" return str_buff