scene: allow postmortem debugging after error in draw

Also small improvement in similar code in event.py
Travis says sys is undefined.