I forgot to mention that the DebugWin method I just mentioned does NOT work to find syntax errors. In this case, the interpreter never tries running code (but I use the Pythonwin check option to find syntax errors first).