Python ActiveX Scripting Engine (0x80020009) Error - KeyboardInterrupt - python 2.2
Chris Prinos
cprinos at foliage.com
Wed May 29 20:21:56 EDT 2002
I had the same issue with my IIS system, and had to use a workaround that
disables the KeyboardInterrupt from being processed. The code I use is
shown below.
see http://mail.python.org/pipermail/python-list/2001-April/039881.html and
http://mail.python.org/pipermail/python-list/2002-April/099002.html for an
explanation
Chris
----------------------------------------------------------------------------
----------------
<!--
These first two script blocks are needed because IIS looks for a SCRIPT
block in the default scripting language of the server. That could be
JScript or VBScript, but it won't be Python.
This is only a problem for this global.asa file.
-->
<SCRIPT LANGUAGE=Jscript RUNAT=Server>
function dummy() {}
</SCRIPT>
<SCRIPT LANGUAGE=VBScript RUNAT=Server>
Sub dummy2
ignore = "me"
End Sub
</SCRIPT>
<SCRIPT LANGUAGE=Python RUNAT=Server>
def Application_OnStart():
# this signal code is a workaround for a bug that causes
# Ctl-C keyboard interrupts to be sent to the python activex engine.
# Not sure if this is a problem with ASP, or python, but if the
# handler is not provided, KeyboardInterrupts will pop up in the most
# inoportune places.
import signal
def noOp(a,b): pass
signal.signal(signal.SIGINT, noOp)
</SCRIPT>
More information about the Python-list
mailing list