title: reading boolean condition from config file?
body: <p>What's the best way to read a condition from a config file in Python using <code>ConfigParser</code> and <code>json</code>? I want to read something like:</p>
  
  <pre><code>[mysettings]
  x &gt;= 10
  y &lt; 5
  </code></pre>
  
  <p>and then apply it to code where <code>x</code> and <code>y</code> are defined variables, and the condition will be applied as to the values of <code>x, y</code> in the code.  Something like:</p>
  
  <pre><code>l = get_lambda(settings["mysettings"][0])
  if l(x):
    # do something
    pass
  l2 = get_lambda(settings["mysettings"][1])
  if l2(y):
    # do something
    pass
  </code></pre>
  
  <p>ideally I'd like to specify conditions like <code>x + y &gt;= 6</code> too.</p>
  
  <p>there must be a better way, but the idea is to constrain the values of variables using simple boolean expressions from the config file.</p>