I want to execute a code helloword.cpp which takes in some argument from console parses those arguments and then prints \"hello world\" in the console.
Now, I want to pa
How about passing whatever text you generate with Python into the standard input of your C++ program? Basically, you have to use Python's subprocess
module to fire up the C++ program and dump the text into its standard output.
In case that your C++ program is required to be running separately in the background, you could try another form of interprocess communication, like unix domain sockets.
Using boost::python is also an option, but it might be a little more difficult to deal with.