'Evaluate code in the context of the frame.'

def eval(self, code, mode='single'):

    if isinstance(code, string_types):
        if (PY2 and isinstance(code, unicode)):
            code = (UTF8_COOKIE + code.encode('utf-8'))
        code = compile(code, '<interactive>', mode)
    return eval(code, self.globals, self.locals)
