how to get string printed by PyErr_Print( )

2018-09-17 Thread Jason Qian via Python-list
Hey, Someone has discussed this issue before. Other than redirect stderr, does the new version python 3.7.0 has other way to retrieve the string whichPyErr_Print( ) ? if (PyErr_Occurred()) PyErr_Print(); //need to retrieve the error to string Thanks --

Re: how to get string printed by PyErr_Print( )?

2008-01-31 Thread grbgooglefan
On Jan 9, 8:01 pm, grbgooglefan [EMAIL PROTECTED] wrote: On Dec 19 2007, 5:55 pm, Christian Heimes [EMAIL PROTECTED] wrote: grbgooglefanwrote: PythonC API functionPyErr_Print( ) prints an error string onto stderr if PyErr_Occurred() is true. I don't want to print this to stderr because

Re: how to get string printed by PyErr_Print( )?

2008-01-09 Thread grbgooglefan
On Dec 19 2007, 5:55 pm, Christian Heimes [EMAIL PROTECTED] wrote: grbgooglefan wrote: PythonC API functionPyErr_Print( ) prints an error string onto stderr if PyErr_Occurred() is true. I don't want to print this to stderr because my Python+C code is running daemon mode won't have

how to get string printed by PyErr_Print( )?

2007-12-19 Thread grbgooglefan
PythonC API function PyErr_Print( ) prints an error string onto stderr if PyErr_Occurred() is true. I don't want to print this to stderr because my Python+C code is running daemon mode won't have terminal / stderr. So, I want to retrieve the string which PyErr_Print( ) will print. E.g.,

Re: how to get string printed by PyErr_Print( )?

2007-12-19 Thread Robert Kern
grbgooglefan wrote: PythonC API function PyErr_Print( ) prints an error string onto stderr if PyErr_Occurred() is true. I don't want to print this to stderr because my Python+C code is running daemon mode won't have terminal / stderr. So, I want to retrieve the string which PyErr_Print( )

Re: how to get string printed by PyErr_Print( )?

2007-12-19 Thread Christian Heimes
grbgooglefan wrote: PythonC API function PyErr_Print( ) prints an error string onto stderr if PyErr_Occurred() is true. I don't want to print this to stderr because my Python+C code is running daemon mode won't have terminal / stderr. So, I want to retrieve the string which PyErr_Print( )