def om_print(object_): """ Prints the string representation of the object Creates a string containing the OpenMath XML representation of the given object and outputs it to std out :params x: The object to be encoded to the string """ ET.dump(om_object(object_))
def om_pretty_print(object_, indent='\t'): """ Pretty prints the string representation of the object Creates a formatted string containing the OpenMath XML representation of the given object and outputs it to std out :params x: The object to be encoded to the string """ print(om_pretty_node(om_object(object_), indent=indent))
def om_string(object_): """ Produces a string representation of an OpenMath XML object Creates a string containing the OpenMath XML representation of the given object. :params x: The object to be encoded to the string :returns: The OpenMath XML string representation of the given x """ return ET.tostring(om_object(object_))