Aborting a Python import from C API

Pete Fraser pete.fraser at snellwilcox.com
Thu Oct 7 10:50:15 EDT 2004


I have written what is effectively a debugger for Python written in 'C'/C++

I have used the PyEval_SetTrace() to set a trace handler and I use this to step through python code very nicely.
However, when I am part way through a file and want to save the (modified) file back to disk it seems to be locked
by Python interpreter.

How can I stop the Python interpreter which is currently waiting for a return from the Trace function that I provided (the thread running Python is suspended).
Returning 0/1 from the Trace function doesn't seem to stop it - is there any other function that I should be calling first.

Thanks for any help for this newbie in Python.

Pete

This email and any attachments is confidential, may be legally privileged and is intended for the use of the addressee only. If you are not the intended recipient, please note that any use, disclosure, printing or copying of this email is strictly prohibited and may be unlawful. If received in error, please delete this email and any attachments and confirm this to the sender.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20041007/0ea53107/attachment.html>


More information about the Python-list mailing list