sys.exit() doesn't exit

Randall Hopper aa8vb at yahoo.com
Tue Oct 19 14:53:21 EDT 1999


I have this situation:

    A Python script (makes calls to:)
    |
    - A C library  (which issues callbacks back to:)
      |
      - The Python script (which invokes:)
        |
        - sys.exit()

Calling sys.exit() in the Python callback doesn't terminate the
application.  Apparently, the SystemExit exception gets lost crossing the C
library frames in the stack.  What's really going on though?

If I want to throw an exception in a Python callback like this, is there a
way for it to unwind the stack across the C library and trigger in the
controlling Python stack frames?

Thanks,

Randall

-- 
Randall Hopper
aa8vb at yahoo.com




More information about the Python-list mailing list