Spawning an interactive interpreter in a running python process?

Gabriel Genellina gagsl-py2 at yahoo.com.ar
Sat Dec 12 00:46:20 EST 2009


En Sat, 12 Dec 2009 02:11:27 -0300, Horace Blegg <tkjthingone at gmail.com>  
escribió:

> I wonder if I could cook something up with PyRun_SimpleString("import  
> pdb;
> pdb.set_trace()"). This bears investigation!

pdb is a debugger, and provides a lot more than you're looking for, I  
presume.
You may want to look at the code [1] and cmd [2] modules too.

[1] http://docs.python.org/library/code.html
[2] http://docs.python.org/library/cmd.html

-- 
Gabriel Genellina




More information about the Python-list mailing list