On Mon, Sep 12, 2011 at 10:05 PM, Ulrich Eckhardt
<ulrich.eckha...@dominolaser.com> wrote:
> Chris Angelico wrote:
>> You can use PyErr_SetInterrupt to raise KeyboardInterrupt
>
> This sounds useful. Just to make sure, this would be called from a different
> thread than the one running the Python script, is that still OK?
>
>> , but it can be caught by the script. There's no guaranteed way,
>> short of killing the process.
>
> This will do for my plans, I'm not trying to defend against anything
> malicious.

Yes, that would be what you want then. The main thing to take care of
is a blanket 'except' that doesn't specify what it's accepting - it'll
snarf the KeyboardInterrupt and carry on its merry way.

ChrisA
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to