0

I would like to call functions in a C++ program from a Python program using RPC. I would also like to have the C++ program be able to periodically poll for the RPC calls, instead of calling a function that it does not return from.

I can do this using SUN RPC (ONC) between a C++ server and C++ client, but I'm not sure how to do this with a Python client.

The server and client will reside on the same machine.

Would anyone have a suggestion and perhaps a minimal example for how I might be able to achieve this?

EDIT: This is about calling functions in a running C++ server from a separate Python client using RPC, not calling functions in C++ library code from Python.

Patrick
  • 147
  • 1
  • 15

1 Answers1

0

I have seen Boost being used for interoperability between c++ and python.

boost.python

But there are many other options explained inn detail here:

interoperability

Community
  • 1
  • 1
basav
  • 1,475
  • 12
  • 20
  • I think those address using C++ library code in Python? I'm interested in calling functions in a running C++ program from another Python program using remote procedure calls. – Patrick Oct 08 '15 at 11:25