rconsole - Remote Python Console
rconsole is a new Python console that you can attach to a running script to inspect and modify its namespace. I hacked it up since I did not find a simple to use alternative to inspect a daemon process.
rconsole is included with the rfoo package at http://code.google.com/p/rfoo/.
To invoke it within a script add the following to its code:
from rfoo.utils import rconsole rconsole.spawn_server()
To attach from another shell do:
$ rconsole
rconsole is not a debugger and does not freeze the script. You can think of it as a window into the belly of a long running script. It is lightweight and non-disruptive. You may leave it inside production code and attach when you need to check in on the health of a long running script:
- Import guppy.hpy into a running script to investigate memory leaks.
- Change function definitions and reload modules on the fly.
- Inspect live internal data structures.
Winpdb - A Platform Independent Python Debugger