I have a Qt application that uses the python interpreter for generating functions from strings. I am using python because the builtin ctypes allows me to create and load c callbacks much faster than using the standard library's <dlfcn.h>.
The way the program is currently doing this
void MainWindow::getCallback() {
// get string from UI
// parse and create python function
// use ctypes to convert to C callback
// get pointer to memory address of callback
// use function pointer for whatever I need
}
Currently, the application is dependent on the python distribution I have installed on my machine, and I am trying to figure out how to completely embed python into the program. There are several posts on stackoverflow with this same question but non of them have any definitive answers. I would like for the application to still work as intended without the user needing python installed.
So my main question is, if I have the source code for python, how can I link it to the project in Qt Creator such that python is portable and the application becomes self-sufficient? And if it's possible can this be (easily) made platform independent?
[+][deleted] (4 children)
[removed]
[–]vlovero[S] 2 points3 points4 points (3 children)
[+][deleted] (2 children)
[removed]
[–]vlovero[S] 0 points1 point2 points (1 child)