These are chat archives for ipython/ipython

9th
Mar 2017
Adrian
@ThiefMaster
Mar 09 2017 14:21
Hi, what's the proper way of embedding ipython in an application? I found this django/django@3570ff7 and using .embed() it doesn't run my startup scripts for example. (not using django myself, it's a custom script that should open an ipython session within the application's environment but besides that behaving exactly as a normal ipython as far as the user's config etc is concerned)
Min RK
@minrk
Mar 09 2017 17:27
@ThiefMaster embed is for embedding IPython in a particular namespace, which is a different way to initialize IPython's namespace compared with the startup files.
If you want your application to start regular IPython, the quickest route is IPython.start_ipython().
embed() is more like a breakpoint for debugging.