What is the Python API equivalent of PyErr_Print(), from the C interface?
I’m assuming a call in either the sys, or traceback modules, but can’t find any functions therein that make calls to PyErr_Print().
Addendum
I’m after the Python call to get the same functionality as PyErr_PrintEx(), described as:
Print a standard traceback to sys.stderr and clear the error indicator.
That is I want to make the Python call that has this effect.
There’s no Python function that’s exactly equivalent to
PyErr_PrintEx(the real name ofPyErr_Print;-), including for example settingsys.last_tracebackand friends (which are only supposed to be set to help a post-mortem debugging from the interactive interpreter for exceptions which have not been caught). What exact combination of functionality are you looking for?