Hi Rocky (awesome name, by the way),

Take a look at the bpdb/ directory in the root of the project directory: 
https://github.com/bpython/bpython/tree/master/bpdb

If I've understood you correctly this should be a working example of what 
you're looking for. It looks like you're more than familiar with pdb so 
hopefully this should be a breeze for you.

Let us now how you get on !

Cheers,

On Thursday, 28 May 2015 09:24:25 UTC+1, Rocky Bernstein wrote:
>
> I have recently been beefing up support of the python trepan debugger 
> <https://pypi.python.org/pypi?name=trepan&:action=display> to go into 
> both a python and ipython shell. In doing that I came across bpython. 
>
> How does one embed a bpython shell from inside another Python program such 
> as a debugger? 
>
> Here are some issues that come up:
>
>
>    1. Setting evaluation (locals, globals) to be in the context of the 
>    debugged program
>    2. Saving/restoring command history
>    3. Saving/restoring command completion functions
>
> To get a sense of how this is done for ipython and python see 
> https://github.com/rocky/python2-trepan/blob/master/trepan/processor/command/ipython.py
>  
> and 
> https://github.com/rocky/python2-trepan/blob/master/trepan/processor/command/python.py
>

-- 
You received this message because you are subscribed to the Google Groups 
"bpython" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/bpython.
For more options, visit https://groups.google.com/d/optout.

Reply via email to