(EMBEDDING) Can't get python error message

Gabriel Genellina gagsl-py2 at yahoo.com.ar
Thu Jul 5 20:48:34 EDT 2007


En Thu, 05 Jul 2007 08:47:57 -0300, <anonymisiert85 at mymail.ch> escribió:

> I run this string to produce a error "x+1"
>
> PyRun_SimpleStringFlags() return -1, so that i know this is a script
> with error inside...
>
> but now - how can i get error message?

Simply, you can't. From http://docs.python.org/api/veryhigh.html: "If  
there was an error, there is no way to get the exception information."
Use another function instead, like PyRun_StringFlags()

-- 
Gabriel Genellina




More information about the Python-list mailing list