I'd like to be able to both start an interactive session after completing a script (which I know can be done with ipython -i myscript.py
), and have the shell execute the whos()
command immediately afterward. This will help my workflow by allowing my to try out a script, and if there are errors, pick out suspect variables in the namespace to see what their deal is (it's often hard to remember exactly which variable is called what).
Is this even possible? I tried ipython -c "whos" -i myscript.py
, but it seems ipython will only run the -i
part or -c
part -- whichever comes first.