Skip to content

Instantly share code, notes, and snippets.

@AnthonyDiGirolamo
AnthonyDiGirolamo / python_interactive_breakpoint
Created December 11, 2009 17:00
python interactive session
#!/usr/bin/python
# Python Interactive Breakpoint
import traceback, code
try:
raise None
except:
frame = sys.exc_info()[2].tb_frame
namespace = dict(frame.f_globals)
namespace.update(frame.f_locals)
code.interact(banner="Entering Interactive Session", local=namespace)