diff options
author | root <root@ghunt-desktop.(none)> | 2010-10-13 03:21:17 (GMT) |
---|---|---|
committer | root <root@ghunt-desktop.(none)> | 2010-10-13 03:21:17 (GMT) |
commit | 8d792268cf8c799185da47995aa7c5374ebb9514 (patch) | |
tree | 481081ebda992cfa72127abeab08369f26acf17a /ipy_sh.py | |
parent | cfba88d43e25c162a70a179d976a8f2c12fc6371 (diff) |
breakpoints, embeded shell
Diffstat (limited to 'ipy_sh.py')
-rw-r--r-- | ipy_sh.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/ipy_sh.py b/ipy_sh.py new file mode 100644 index 0000000..7b3b755 --- /dev/null +++ b/ipy_sh.py @@ -0,0 +1,21 @@ +#!/usr/bin/env python +#ipy_sh is module which encapsulates IPython.IPShellEmbed to work with gtk gui +import IPython +import inspect + +class PSE(IPython.Shell.IPShellEmbed): + def __init__(self): + frame = inspect.currentframe() + try: + info = inspect.getframeinfo(frame,context=3) + finally: + del frame + print('filename:%s line:%s function:%s index into code %s'%(info[0],info[1],info[2],info[4],)) + for line in info[3]: + print line + args = ['=pi1','in <\\#>:','-po','Out<\\#>:'] + IPython.Shell.IPShellEmbed.__init__(self,args,banner='Now in shell at your breakpoint\nTry debug\n') + +if __name__ == '__main__': + test = PSE() +
\ No newline at end of file |