简体   繁体   中英

Embed python as scripting language on my python application

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?

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/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM