I didn't find a module that did this in my 10-second Google search, so I built this.
Update: I did a 30-second Google search, found Sympy and now use that instead. Sorry, Expression-Processor.This project converts a given expression from infix to outfix (Reverse Polish Notation), and then calculates the result.
Examples:
rpn.calculateInfix("(2sin(pi/2))^-1") --> 0.5
rpn.infixToRPN("(2sin(pi/2))^-1") --> ['2', 't', '2', '/', 'a', '*', '-1', '^']
# Note that "t" represents pi, and "a" represents sin() within the program.
rpn.py contains a little library and some tools for solving infix and outfix-notation expressions.
It accepts expressions, not equations, meaning there should be no "=" equals sign.
# Please note that this repository cannot yet handle imaginary values.