statphysandml/LatticeModelSimulationLib

Python integration

Closed this issue · 1 comments

I highly recommend this library for combining C++ and Python:

https://github.com/pybind/pybind11

For your existing use case of calling the python interpreter from c++ code it would be helpful:

  • it takes care of linking python.h etc at the CMake stage
  • provides a nicer interface to call the python interpreter from c++

It is also then fairly easy to provide a Python interface to your C++ code, if at some point you are interested in inverting the relationship between languages here (i.e. the more common setup is to have the high performance C++ code wrapped with a Python interface for users to interact with, rather than calling Python from the c++ side)

Hey Ikeegan, thank you very much for the hint! I changed the Python integration as suggested by you.