Debugging a script

Graham Nicholls graham at
Fri Jan 2 21:23:49 CET 2004

I've got a (python) program which crashes.  WHat I'd like to do is something
loke this:

                lots of stuff, or 
                more pertinintly, the code which is failing
                drop in to the debugger

So that I can print various things.

Also, is there a way to display the line number  - eg:
        except something:
                print ("DEBUG: exception %s at line number %s" % (sys.exc_type,

Python 2.3 (#1, Sep 11 2003, 14:36:40)
#include <wit>

More information about the Python-list mailing list