Madx evaluate numeric expression

Hello,

This contains a python method that can be used to evaluate a numeric expression and return a double. I did not see any easier way to do this. Maybe you know about a short cut?

Best regards,
Thomas