Links
- Source
- FAQ
- Documentation
- Introduction
- Embedding
from IPython import embed ; embed() # this call anywhere in your program will start IPython
- Tip Sheet
- Cookbook
- With ZMQ (i.e. client/server)
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()