I need to send some data from a Python program to a C++ program. The current design is such that the C++ program executes the python program in a separate thread. I wish to pass some result from the python program back to the C++ program.
What I have found so far includes:

Sending over sockets
Sending via a pipe
Using a temporary file
Embedding the python interpreter in the C++ program
Using boost.python

My data (to be passed back to the C++ program) is essentially a python dictionary, and a few files. (I am sending email details, and the attachments). What strategy should I use?
Is there anything I can do to make my work easier? Or can I improve my program design?
EDIT: Added boost.python to the list of options found.
I ended up altering the the modules such that the C++ part and the Python part can work more or less independently of each other. But if passing data was necessary, I guess I would have gone via the socket route.
Strategies to send data from a Python program to a C++ program