summaryrefslogtreecommitdiffstats
path: root/bindings/python/README.md
blob: f2ad92813485e816dabf858ee2fa96f8d496a5c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Python bindings

These are bindings on the `CParameterMgrFullConnector` class, its inner
`Ilogger` class and both classes involved in the SelectionCriterion creation.

They are complete enough to write a parameter-framework client in Python and
also access most of the tuning interface.

## Generation

The bindings are defined unsing SWIG in the `pfw.i` file and the actual source
files are generated by the command found in `regen_swig.sh`. This command must
be re-run whenever any file in `parameter/include` is modified.

Two things are generated:

- A C++ source file providing a low-level wrapping of the parameter-framework
  classes. When compiled as a shared library, it can be imported from Python as
  a module called `_PyPfw` but this module is not for direct use.
- A Python module called `PyPfw`, using `PyPfw`, providing proxy classes of the
  parameter-framework's native classes. *Please not that in the context of the
  Python bindings, the `CParameterMgrFullConnector` class is renamed
  `ParameterFramework`.*

## Usage

`sample.py` provides an example of how to use the PyPfw module. Note that the
PYTHONPATH env variable must contain the directory of both `_PyPfw.so` and
`PyPfw.py`.