Equation parsing in Python

Posted by MikeCroucher on Stack Overflow See other posts from Stack Overflow or by MikeCroucher
Published on 2009-02-27T10:42:07Z Indexed on 2010/03/29 12:13 UTC
Read the original article Hit count: 387

Filed under:
|
|

How can I (easily) take a string such as

'sin(x)*x^2'

which might be entered by a user at runtime and produce a python function that could be evaluated for any value of x? Does anyone know of any libraries or modules that takes care of this sort of thing?

© Stack Overflow or respective owner

Related posts about python

Related posts about equation