MCPcopy Create free account
hub / github.com/Singular/Singular / python_eval

Function python_eval

Singular/dyn_modules/pyobject/pyobject.cc:424–428  ·  view source on GitHub ↗

Evaluate string in python

Source from the content-addressed store, hash-verified

422
423/// Evaluate string in python
424PythonObject python_eval(const char* arg)
425{
426 PyObject* globals = PyModule_GetDict(PyImport_Import(PyString_FromString("__main__")));
427 return PyRun_String(arg, Py_eval_input, globals, globals);
428}
429
430/// Evaluate string in python from Singular
431BOOLEAN python_eval(leftv result, leftv arg)

Callers 2

names_from_moduleFunction · 0.85
sync_contextsFunction · 0.85

Calls 4

WerrorSFunction · 0.85
assign_toMethod · 0.80
TypMethod · 0.45
DataMethod · 0.45

Tested by

no test coverage detected