ipy_pydb.py
21 lines
| 455 B
| text/x-python
|
PythonLexer
|
r387 | import pydb | |
import IPython.ipapi | |||
from IPython.genutils import arg_split | |||
ip = IPython.ipapi.get() | |||
def call_pydb(self, args): | |||
argl = arg_split(args) | |||
|
r388 | # print argl # dbg | |
|
r387 | if ip.IP.has_readline: | |
ip.IP.savehist() | |||
try: | |||
|
r388 | pydb.runl(*argl) | |
|
r387 | finally: | |
if ip.IP.has_readline: | |||
ip.IP.readline.read_history_file(self.shell.histfile) | |||
ip.expose_magic("pydb",call_pydb) | |||