Want to pass a QDomDocument to an embedded Python script
-
I'm trying to pass a QDomDocument to an embedded Python script. I believe I can use Py_BuildValue, but I can't find any good examples that show you how to pass your own object. Cany anyone point me to some good examples of this?
@kesterpm said in Want to pass a QDomDocument to an embedded Python script:
embedded Python script
In what way embedded? Is your app written in C++ and you're running a Python script inside your app?
-
Maybe the code injection part will offer some insight for your use case.
-
Yes, that code has been written and tested. The trick is passing this custom datatype between c++ and python. I could send a string over and import it into a qdomdocument, but that seems really inefficient.
-
Maybe the code injection part will offer some insight for your use case.
@SGaist Yeah it seems like you need to create a wrapper in C++ somehow. I would think a wrapper exists already, but I can't find any good examples. I'm pretty close to just sending it as a string to python, then converting it to a QDomDocument in the embedded python. Thanks for pointing me to those documents.