* update the CMakeLists
- remove the deprecated commands ('PythonInterp', ...)
(https://cmake.org/cmake/help/latest/module/FindPythonInterp.html)
- change the CMake minimum version from 3.8 to 3.12 (released in July 2018)
* rename the libiec61850 Python module into 'pyiec61850'
- to avoid name conflict with the name for the C static lib
- the build artifacts are now 'pyiec61850.py' and '_pyiec61850.so'
Signed-off-by: Mikael Bourhis <mikael.bourhis@smile.fr>
Before building you should install swig and python.
To build python bindings you have to turn on the BUILD\_PYTHON\_BINDINGS flag in CMake from cmake-gui or in command line:
```sh
$ cmake -DBUILD_PYTHON_BINDINGS=ON .
$ mkdir build && cd build
$ cmake -DBUILD_PYTHON_BINDINGS=ON ..
```
Then compile the library and install it:
```sh
$ make
$ sudo make install
```
CMake and swig will automatically detect your python version and install the python library in python library directories.
For running the integrated tests:
```sh
$ make test
```
Then compile the library and install it. CMake and swig will automatically detect your python version and install the python library in python library directories.
pyiec61850 library is to be imported calling
```python
import iec61850
import pyiec61850 as iec61850
```
# Client tutorial
The python bindings works similarly to the basic C library. However there are some differences: