I'm working on a test application that embeds the Python interpreter.
I have the following problem...
I've created my own interactive interpreter loop. Essentially, it
reads the command from the prompt and calls the following C code:
PyObject* pMainModule = PyImport_AddModule("__main__");
Ron Adam wrote:
> I had read somewhere that exception objects were global, but that wasn't
> correct, after testing it, they appear to be part of the local frame. So
> once a function exits, any exceptions objects that happened inside the
> function are no longer retrievable.
>
> And checking e
Steven Bethard wrote:
> Ron Adam wrote:
>
>>Do exceptions that take place get stored in a stack or list someplace?
>
> [snip]
>
>>I know I can catch the error and store it myself with,
>>
>>except Exception, exc:
>>
>>or possibly,
>>
>>errlist = []
>>errlist.append(sys.exc_info())
>>
Ron Adam wrote:
>
> Do exceptions that take place get stored in a stack or list someplace?
[snip]
> I know I can catch the error and store it myself with,
>
> except Exception, exc:
>
> or possibly,
>
> errlist = []
> errlist.append(sys.exc_info())
>
> But what I want to know is do
I'm trying to understand exception handling better and have a question I
haven't been able to find an answer too. Which probably means It won't
work, but...
Do exceptions that take place get stored in a stack or list someplace?
For example in:
try:
try:
try:
riskyf