User Tools

Site Tools



This shows you the differences between two versions of the page.

Link to this comparison view

python-usage [2016/01/11 20:55] (current)
didier created
Line 1: Line 1:
 +The Python binding is available for both Python2 (tested with version 2.7 only) and Python3 (tested with version 3.4). The examples on this page require that you first [[python-install|build and install the Python binding]] on your system.
 +======== Run the simple example ========
 +An example is provided in ''​contrib/​python/​''​. You may execute it to exercise the Python binding:<​code>​
 +$ python ./​contrib/​python/​ 10
 +create a stream of RTP packets
 +10 60-byte RTP packets created with 20-byte payload
 +create ROHC compressor
 +create ROHC decompressor
 +all 10 packets were successfully compressed
 +232 bytes (39%) saved by compression</​code>​
 +The example program accepts additional options to make it more verbose:<​code>​
 +$ python ./​contrib/​python/​ 10
 +usage: packets_number [verbose [verbose]]</​code>​
 +If you specify ''​verbose''​ once, the program prints more information for every packets it compresses then decompresses. If you specify ''​verbose''​ twice, the program prints ROHC library traces for every packets it compresses then decompresses.
 +======== Run the Python'​s non-regression test ========
 +The non-regression was re-implemented in Python. It is useful to fully test the Python binding.
 +$ USE_PYTHON=2.7 make -C test/​non_regression/​ check    # for Python 2.7
 +$ USE_PYTHON=3.4 make -C test/​non_regression/​ check    # for Python 3.4</​code>​
python-usage.txt · Last modified: 2016/01/11 20:55 by didier