Re:Embedding the Python Interpreter in a Qt Application
by drdaeman on Monday March 13, 2017 @08:12PM
(#13863801)
There are sub-interpreters: https://docs.python.org/3/c-api/init.html#sub-interpreter-su...
Re:Embedding the Python Interpreter in a Qt Application
by _wmd on Monday March 13, 2017 @11:03PM
(#13864623)
Subinterpreters still share a lock and suffer from compatibility issues with C extension modules as the module interface only exports a very primitive notion of per-subinterpreter state, they're pretty much not all that safe to use unless you have a very constrained environment
Re:Embedding the Python Interpreter in a Qt Application
by istotex on Monday March 13, 2017 @06:22PM
(#13863058)
A big advantage of embedding the Python interpreter is that it cannot be replaced by a malicious program pretending to be Python. It’s going to be internal to your binary, so it will be difficult for someone to intercept the scripts you are executing, or modify the functionality of your application.
There are only a handful of cases where it is worthwhile to embed the Python interpreter. For most cases, running Python in a separate process is probably the best approach.
In the end, for me, it was easier to share file formats between the C++ and Python and run the Python scripts out of process.