[IPython-User] Document ipython embedding in Qt
Tue Sep 3 14:35:35 CDT 2013
On 3 September 2013 12:22, Antony Lee <firstname.lastname@example.org> wrote:
> While I could provide a brand-new configuration for my own embedding
> use-case, it does seem to be an overkill, as the user should just be able
> to re-use most of his "default" configuration instead (e.g., the app
> doesn't care what the user prefers for his font size, or what kind of
> autoreload he wants). (All this is quite theoretical as I'm also the only
> user for now but well... in practice I just didn't want to duplicate my
> own ~/.ipython/profile_default/ipython_qtconsole_config.py :-)) Anyways, I
> will try to write some docs on that.
It should be possible to merge a config object from loading a config file
with a config object created in your application, in that case. But that
may be too much detail for a small example.
> Also, I just realized that in-process kernels may not be the best choice
> for my use-case (still unclear to me though...). Is there any way I could
> replicate the functionality of
> http://stackoverflow.com/questions/11513132/embedding-ipython-qt-console-in-a-pyqt-applicationin IPython 1.0? I have figured out how to start a kernel in a separate
> process, but I don't know how to push my objects (in the app process) to
> the kernel namespace (all I have in the app process is a Popen object to
> the kernel process).
The response to that SO question led to the creation of the in-process
kernel, so I suspect that it what you want. The rationale for an in-process
kernel was to allow exposing objects in the app process to an embedded Qt
console. Otherwise, you can embed the kernel and pop out a Qt console in a
separate frontend, or embed the frontend and have the kernel in another
process (in which case, as you found, you can't easily push objects into
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the IPython-User