PyImport_ImportModule("cStringIO") failure with undefined symbol
Borse, Ganesh
ganesh.borse at credit-suisse.com
Thu Jan 10 20:31:26 EST 2008
Hi,
Can you please guide me for the following problem?
The call to "PyImport_ImportModule("cStringIO");" is failing with an error of "undefined symbol: PyObject_SelfIter".
Before importing this module, I am importing only the sys module.
Py_SetProgramName("/usr/bin/python");
Py_Initialize();
char* argv[] = { "python","-v",""};
PySys_SetArgv(2,argv);
PyRun_SimpleString("import sys");
PyObject *modStringIO = NULL;
// Import cStringIO module
modStringIO = PyImport_ImportModule("cStringIO");
Should I be importing any other additional module(s) to make this import work?
Please help.
I am trying to use the function GetPythonErrorMessage provided in this post:
http://groups.google.com/group/comp.lang.python/browse_thread/thread/9212ebc42e8438a7/f0bd5f5b15902b14?lnk=gst&q=PyErr_Print#f0bd5f5b15902b14
Thanks in advance for your help.
Regards.
==============================================================================
Please access the attached hyperlink for an important electronic communications disclaimer:
http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html
==============================================================================
More information about the Python-list
mailing list