Monday, 9 September 2013

Python: frame parameter of signal handler

Python: frame parameter of signal handler

I was looking through the Python documentation for signal and in the
example code:
def handler(signum, frame):
print 'Signal handler called with signal', signum
raise IOError("Couldn't open device!")
The 'frame' parameter is not used in the actual function. I noticed this
in a lot of code on stackoverflow/online regarding signal handlers. What
is the 'frame' parameter? Why is it kept in the function header?
Thank you

No comments:

Post a Comment