ipython 

Send to Kindle
home » snippets » python » ipython


Pages
notebook        



Bag

from IPython import ipmaker
ipmaker.make_IPython(argv=[], embedded=True).embed_mainloop()

Alternate method:

from IPython.config.loader import Config
from IPython.frontend.terminal.embed import InteractiveShellEmbed

# This will be the namespace of the embedded interpreter.
namespace = dict(a=10, b=20)
ipshell = InteractiveShellEmbed(
    config=Config(), user_ns=namespace)
ipshell()