Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Inspect Shell lets you easily use a shell to inspect a process as it's running
Failed to load latest commit information. restructring readme keyboard interruption

Ever want to know what the hell that python script is doing? Enter the Inspect Shell. Inspect Shell lets you print/alter globals and run functions without interrupting the running script. Now with auto-complete and command history (only on linux).

Inspect Shell is not a pdb-style debugger.

How to set up

Put in the directory of the script you want to inspect.


import inspect_shell

to the top of that script.

That's it.

How to use

Run your script. Then run:

$ python

You'll now have an interactive shell to your script. Anything you do will affect the script on the fly. However, be mindful that Inspect Shell provides no locking when you're altering global namespace of your script. The best uses for Inspect Shell are for passive inspection of objects.


$ rs:1234> print some_module
<module 'some_module' from '/whatever'>

$ rs:1234> print some_module.some_config_value

$ rs:1234> some_module.some_config_value = 292

...And your script keeps on running, but with whatever changes you made from the shell.

Something went wrong with that request. Please try again.