Input the output of one program into another program

As mentioned in the comments, there are many alternatives. However, I do not suggest the solutions like writing out to a file and reading from another program because you can face with problems like synchronization of access to the file or bottleneck (may not be in this case but on big data transfers) file I/O performance. Using mechanisms such as pipes or sockets would be a better solution.

If both software use Qt Framework, then I can suggest you to use Qt Remote Objects. Both PyQt and Qt C++ support QtRO communication.

In QtRO, the objects can be shared between applications through a defined interface. The source node (program 1) shares the object that contains bill. The clients can access the replicas of the shared object and get properties. When the replica is received, it can be used like any other QObjects.

For more information about Qt Remote Objects: https://doc.qt.io/qt-6/qtremoteobjects-index.html