Esempio n. 1
0
def delete(ename):
    """
    Deletes the expression with given name if it exists.
    """
    if exists(ename):
        try:
            visit.DeleteExpression(ename)
        except:
            # must be a database expression
            pass
Esempio n. 2
0
def clear():
    """
    Deletes all existing expressions.
    """
    expr_names = [expr[0] for expr in visit.Expressions()]
    for ename in expr_names:
        try:
            visit.DeleteExpression(ename)
        except:
            # must be a database expression
            pass