handle exception to file

Thomas Thomas wrote:

This is probably a C++ exception, if so it is probably crashing before there is a chance to flush the output buffer.

Is there a way to handle this exception /flush the buffer inside my python app.

If you make the file(-like) object assigned to sys.stderr be an unbuffered file then as things are written to the file they should be flushed to disk immediately.

Can you explain why I am getting a C++ exception instead of python exception.

Because something in the C++ code either crashed or raised an exception. Since you're getting it when you force quit the process (IIRC) then it's not too surprising.

ยทยทยท

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!