1

New Question that builds on this one. I think IPython is a much more suitable alternative for what I am aiming for than the vanilla interpreter

Does anyone know of a class/code I could pickup that instantiates a IPython embedded shell in a QT Widget without launching a kernel ?

I want to be able to provide the intepreter variables of my PyQt app just like one would do when instantiating a native python embedded interpreter. I also want the intepreter to be able make calls to the parent app (via the locals passed to the interpreter).

I have had a cursory glance over spyderlib's IPython interpreter machinery and it seems to instantiate a kernel as part of it's widget initialization.

In case you are wondering what I am trying to achieve, I'm creating a research platform for text analysis. So I'm bridging forum data, stored in a postgres database, to the python nltk project via a GUI application.

1 Answer 1

2

The design is that the IPython Qt console widget is just a frontend for a kernel. At present, we've only written a way for the kernel and the frontend to exist in two separate processes. There's work in progress to add a kernel that runs in the same process, which should make what you want possible:

https://github.com/ipython/ipython/pull/2397

If you'd like to test that out, any feedback is welcome. Here's an example of the code you'd need to start it:

https://gist.github.com/3659874#file_embedded_qtconsole.py

Sign up to request clarification or add additional context in comments.

1 Comment

I love you ! Ok so I'll start integrating it and provide feedback if needed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.