Feasibility of Embedding Jupyter-like Python Console in Qt using C++
-
wrote on 17 Jul 2024, 15:43 last edited by
Hello Qt Community,
I've searched on GitHub and found QtConsole, which is a Python implementation using PyQt but does not support C++. I'm exploring the feasibility of embedding a Jupyter-like Python console in my Qt application using C++. Is this idea feasible given this context, and if so, are there any resources or advice you can provide?
Thank you!
farley -
Hello Qt Community,
I've searched on GitHub and found QtConsole, which is a Python implementation using PyQt but does not support C++. I'm exploring the feasibility of embedding a Jupyter-like Python console in my Qt application using C++. Is this idea feasible given this context, and if so, are there any resources or advice you can provide?
Thank you!
farley -
Hi,
Something is not clear for me in your question. Do you want to have a terminal in your application or do you want to be able to run Jupyter as done with QtConsole ?
-
Any I/O-TextWidget in Qt can be a Python console, if you pass the input to some underlaying
QProcess
and call the python interpreter in the background.
(Hard to show graphics in there, I guess)But why?
wrote on 18 Jul 2024, 00:37 last edited by@Pl45m4 @SGaist thanks for your reply. i am not very clear on this idea. i just want to embed a python console in my application. terminal is too simple than jupyter. on the other hand, there is not a jupyter like console in github using qwidget, i don’t know if it’s a good idea to implement it such as named QJupyterWidget to replace the standard terminal for better appearance and better outputs when embedded into a application?
-
@Pl45m4 @SGaist thanks for your reply. i am not very clear on this idea. i just want to embed a python console in my application. terminal is too simple than jupyter. on the other hand, there is not a jupyter like console in github using qwidget, i don’t know if it’s a good idea to implement it such as named QJupyterWidget to replace the standard terminal for better appearance and better outputs when embedded into a application?
-
-
You might want to check the Serial port terminal example.
Depending on what you want to achieve Kate's terminal(article discussing having it on Windows as well) using Konsole might be another possibility. But all in all, you really need to define what you want to do as depending on that you will either ensure your user has python installed or you'll have python built into your application.
1/8