Also, by looking at the code below, you might want to modify this `func = prettyForm( binding=prettyForm.POW, ...)` . When I had a quick look, I don't know how it does this, but the documentation says, it helps in identifying when a paranthesis needs to be put.