Ejemplo n.º 1
0
 def evalcode(self, code, input_type):
     """
     Evaluate `code` in a Python or Cython stack frame using the given
     `input_type`.
     """
     frame = self._find_first_cython_or_python_frame()
     executor = libpython.PythonCodeExecutor()
     if self.is_python_function(frame):
         return libpython._evalcode_python(executor, code, input_type)
     return self._evalcode_cython(executor, code, input_type)
Ejemplo n.º 2
0
 def evalcode(self, code, input_type):
     """
     Evaluate `code` in a Python or Cython stack frame using the given
     `input_type`.
     """
     frame = self._find_first_cython_or_python_frame()
     executor = libpython.PythonCodeExecutor()
     if self.is_python_function(frame):
         return libpython._evalcode_python(executor, code, input_type)
     return self._evalcode_cython(executor, code, input_type)