Hi, I wrote one simple C code and integrated python interpreter.
I am using Python C API to run the python command. Below code used Python C API inside .c file. PyObject* PyFileObject = PyFile_FromString("test.py", (char *)"r"); int ret = PyRun_SimpleFile(PyFile_AsFile(PyFileObject), "test.py"); if (ret != 0) print("Error\n"); Above code working fine. It runs the "test.py" but inside "test.py" there is some print statement so how can i read those messages in this .c file from console ? Thanks in Advance. -- https://mail.python.org/mailman/listinfo/python-list