Light-weight C++ library for embedding Python into C++
ECS:Python (Embedded C++ Scripting with Python) is a simple Python wrapper library designed specifically for C++ developers who wish to add Python scripting to their new / existing C++ projects. ECS:Python allows you to expose objects from a C++ application to an embedded Python interpreter for interactive scripting. ECS:Python is light-weight and easy to use.
To get started all you need to do from your project is #include "EcsPython.h", and link to the EcsPython library. Included with ECS:Python is a demo project (/example) written to assist developers in understanding how to use the API.
ECS:Python requires a Python distribution to be installed on your system. Python can be downloaded from: www.python.org/download
git clone https://github.com/cross-platform/ecs-python.git
cd ecs-python
mkdir build
cd build
cmake ..
make
cmake ..
will auto-detect your IDE / compiler. To manually select one, usecmake -G
.- When building for an IDE, instead of
make
, simply open the cmake generated project file.
The Windows Python distros do not come packaged with a debug library: "pythonXX_d.lib". So, in order to get ECS:Python to compile in Debug mode:
- Open: "<python_install_dir>\include\pyconfig.h"
- Comment out the line "# define Py_DEBUG"
- Search and replace "_d.lib" with ".lib"