If you by any chance would like to use the excellent python shell IPython as an embed shell on an application or virtual terminal, you can instantiate it using the IPShellEmbed class provided by IPython. Let’s say that your environment doesn’t like IPython default color scheme and you need to start it without colors (same as doing ipython -colors NoColor). You can use an embed shell in your code the following way:
import IPython embedshell = IPython.Shell.IPShellEmbed(argv=["-colors", "NoColor"]) embedshell()
argv are the arguments you would normally pass to the main ipython script.
I hope that was useful 🙂