Reputation: 608
I'm trying to make a python GUI application that handles some sort of data. Then I expect to make the user capable of manipulating that data using python scripts, form within the GUI, using a script interpreter with the data exposed as pre-existing objects. Pretty much like VBA is embedded in MSWord or the way you can embed python on a C application (see here).
Is there any technique or library to do this?
Has this been achieved in some project before?
Upvotes: 1
Views: 543
Reputation: 1418
One way to do it would be to write a GUI in PyQt, and then embed an iPython console inside the GUI as a GUI widget.
Check out this answer: Embedding IPython Qt console in a PyQt application
and a couple other suggestions here: https://github.com/ipython/ipython/issues/9508
A different non-PyQt approach is described here: https://www.pythoncentral.io/embed-interactive-python-interpreter-console/
Upvotes: 2