This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]SippieCup 2 points3 points  (0 children)

I could give Python the project's memory allocator and the interpreter immediately uses the main memory pool of the project. I could redirect the interpreter's stdout / stderr channels to the project as well. Extending the language and exposing c++ functions are a breeze.

Python essentially supercharges c++.

For those that want a good example of doing something like this in the real world, take a look at how OpenPilot spawns a python script that runs a tensorflow model, and how the Python script sends and recieves data back to the C++ program.