I'm curious, in an academic sense, if it's possible to spawn the
interactive interpreter (>>>) in a running python application. Ideally, I
would like to be able to access the modules, functions and variables the
application can.
Is something like this possible?
While not exactly "the interactive interpreter", you can use pdb
to drop to a debugging prompt where you can "access the modules,
functions and variables the application can". The common idiom
is to insert a line like
import pdb; pdb.set_trace()
in your code to have a break-point stop execution at the
designated point and leave you at a prompt where you can explore.
-tkc
--
http://mail.python.org/mailman/listinfo/python-list