def test():
    "Run a simple demo that shows evaluator's capability."
    from sys import exc_info, stderr
    from traceback import format_exception_only
    local = {}
    while True:
        try:
            evaluate(input('>>> '), local)
        except EOFError:
            break
        except:
            stderr.write(format_exception_only(*exc_info()[:2])[-1])
Run a simple demo that shows evaluator's capability.
recipes/Python/577469_Evaluator_20/recipe-577469.py