I\'ve got some dynamically-generated boolean logic expressions, like:
If you set up dicts with the locals and globals you care about then you should be able to safely pass them along with the expression into eval().