I would like to add some commandline options to a python launch code in order to actually invoke an ipython shell. How do I do that?
To start IPython from directly from Python you can do that:
python -c "from IPython import embed; embed()"
embed will use all local variables inside shell.
If you want to provide custom locals take a look at