(s, local_dict)
return eval(e, global_dict, local_dict)
Converts the string "s" to a SymPy expression, in local_dict.

    It converts all numbers to Integers before feeding it to Python and
    automatically creates Symbols.
Converts the string "s" to a SymPy expression, in local_dict.
Converts the string s to a SymPy expression in local_dict .
def parse_expr(s, local_dict):
    """
    Converts the string "s" to a SymPy expression, in local_dict.

    It converts all numbers to Integers before feeding it to Python and
    automatically creates Symbols.
    """
    global_dict = {}
    exec_('from sympy import *', global_dict)
    try:
        a = parse(s.strip(), mode="eval")
    except SyntaxError:
        raise SympifyError("Cannot parse %s." % repr(s))
    a = Transform(local_dict, global_dict).visit(a)
    e = compile(a, "<string>", "eval")
    return eval(e, global_dict, local_dict)
def parse_expr ( s , local_dict ) : global_dict = { } exec_ ( 'from sympy import *' , global_dict ) try : a = parse ( s . strip ( ) , mode = "eval" ) except SyntaxError : raise SympifyError ( "Cannot parse %s." % repr ( s ) ) a = Transform ( local_dict , global_dict ) . visit ( a ) e = compile ( a , "<string>" , "eval" ) return eval ( e , global_dict , local_dict )