Is there a way to temporarily halt execution of a script (without using a debugger) and have it put you in an interactive session where you have access to the locals? And possibly resume? For example:
>>> def a(): ... x = 1 ... magic_breakpoint() ... y = 1 ... print "got here" ... >>> a() Traceback (most recent call last): File "<stdin>", line 1, in ? File "<stdin>", line 3, in a File "<stdin>", line 2, in magic_breakpoint >>> x 1 >>> y Traceback (most recent call last): File "<stdin>", line 1, in ? NameError: name 'y' is not defined >>> magic_resume() got here >>> x Traceback (most recent call last): File "<stdin>", line 1, in ? NameError: name 'x' is not defined -- http://mail.python.org/mailman/listinfo/python-list