Advertisement
Guest User

Untitled

a guest
Sep 26th, 2017
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. 326 // Initialize the embedded Python interpreter and load the module
  2. 327 Py_Initialize();
  3. 328 PyObject* logic = PyImport_Import(PyString_FromString((char*)"sympy.logic"));
  4. 329 PyObject* simplify_logicF = PyObject_GetAttrString(logic, (char*)"simplify_logic");
  5. 330
  6. 331 // Invoke simplify_logic
  7. 332 //PyObject * result = PyObject_CallFunction(simplify_logicF, (char*)"n1&n1");
  8. 333 PyObject* argument = PyTuple_New(1);
  9. 334 PyTuple_SetItem(argument, 0, PyString_FromString("n1&n1"));
  10. 335 PyObject* result = PyObject_CallObject(simplify_logicF, argument);
  11. 336 cout << PyString_AsString(result);
  12. 337 exit(0);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement