Created
November 11, 2008 10:30
-
-
Save svetlyak40wt/23799 to your computer and use it in GitHub Desktop.
IPython debugger. This is a slightly changed ipdb code.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # This is a slightly changed ipdb (http://pypi.python.org/pypi/ipdb) code. | |
| # Shell creation was moved to the set_trace function, because the issue | |
| # with standart unittest module. Now it is usable. | |
| try: | |
| import sys | |
| from IPython.Debugger import Pdb | |
| from IPython import ipapi | |
| from IPython.Shell import IPShell | |
| def set_trace(): | |
| shell = IPShell(argv=[]) | |
| ip = ipapi.get() | |
| Pdb(ip.options.colors).set_trace(sys._getframe().f_back) | |
| except ImportError: | |
| from pdb import set_trace |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment