[python-win32] How to interrupt embedded python interpreter

Mark Hammond mhammond at keypoint.com.au
Mon Mar 15 04:07:29 EST 2004


Pythonwin uses PyErr_SetInterrupt() to implement this via the taskbar icon,
and it seems to work OK.

Mark.

> -----Original Message-----
> From: python-win32-bounces at python.org
> [mailto:python-win32-bounces at python.org]On Behalf Of Chaffin, Michael
> Sent: Saturday, 13 March 2004 10:10 AM
> To: 'python-win32 at python.org'
> Subject: [python-win32] How to interrupt embedded python interpreter
>
>
> I am trying to figure a way to pass on an interrupt to embedded python
> interpreters, specifically say when the  my python script
> object goes out of
> scope. I have found an article by Stefan Migowky titled,
> 'Embedded python:
> how to force a break to endless looping python'.
>
> (http://groups.google.com/groups?q=python+%22Stefan+Migowsky%2
> 2&hl=en&lr=&ie
> =UTF-8&oe=UTF-8&newwindow=1&selm=326536345498D311B3BC00105A398
> 02A074853%40ne
> wsintern.dspace.de&rnum=13 )
>
> The problem I see with this solution is patching the python
> dll, and the
> patch is kind of old. Is there another way to interrupt
> embedded python
> interpreters ?
>
> If not, will the patch from Stefan still work on python 2.2 or 2.3 ?
>
> Michael S. Chaffin
>
> _______________________________________________
> Python-win32 mailing list
> Python-win32 at python.org
> http://mail.python.org/mailman/listinfo/python-win32




More information about the Python-win32 mailing list