   boost::python embedding error finding
  HeyIm creating a game using python as a embedded scripting language.( using boost.python to intergrate python )Now what I want is to get the information that PyErr_Print() prints.As I dont got any console I find it hard to get this information.Please help me..[Edited by - CoMaNdore on June 2, 2006 5:16:49 PM]
  Did you try putting PyErr_Print into Google? It seems you are not the first to ask this, and there seem to be a few comments about redirecting the error output.   ;  Hey stupid of me to just browse the python.boost pages when this is a python problem. Anyway I wanted to do this from the c++ side of thingsHere is how it works (it do need some polish but anyway.. )class PythonStdoutCatcher{public:void write( std::string p_Data ){m_Data += p_Data;}std::string GetData(){return( m_Data );}void Catch(){m_Data = "";object sys_obj( handle<>( PyImport_ImportModule( "sys" ) ) );sys_obj.attr( "stdout" ) = (object)*this;}private:static std::string m_Data;};// into boostBOOST_PYTHON_MODULE( testmod ){class_<StdoutCatcher>( "StdoutCatcher" ).def( "write", &StdoutCatcher::write ).def( "GetData", &StdoutCatcher::GetData );};//usage:StdoutCatchersc;sc.Catch();// end of app// logger is my log class use whatever you wantLogger::Text( sc.GetData() ); [Edited by - CoMaNdore on June 9, 2006 12:52:13 PM]