'Evaluate code within a restricted environment.
The code parameter must either be a string containing a Python
expression, or a compiled code object, which will be evaluated in
the restricted environment\'s __main__ module.  The value of the
expression or code object will be returned.'

def r_eval(self, code):

    m = self.add_module('__main__')
    return eval(code, m.__dict__)
