/>


RCFProto Python Demo

This section describes how to build and run the RCFProto Python demo server and client, on Unix platforms. You will need the source distribution to follow these steps.
Prerequisites
Make sure you have the following prerequisites installed. The commands listed below show how to install the prerequisites on Ubuntu Linux.

  • C++ compiler (g++ or similar):

  • sudo apt-get install g++

  • cmake:

  • sudo apt-get install cmake

  • Boost:

  • sudo apt-get install libboost-dev

  • zlib:

  • sudo apt-get install zlib1g-dev

  • OpenSSL:

  • sudo apt-get install libssl-dev

  • Python development libraries:

  • sudo apt-get install python-dev

  • Protocol Buffers Python libraries:

  • sudo apt-get install python-protobuf

Building RCFProto Python bindings
  • From the root directory of the distribution, run cmake to generate the makefile:

  • mkdir make

    cd make

    cmake -G "Unix Makefiles" ..

  • Run make:

  • make

  • The python/bin/x86 or python/bin/x64 directory should now contain _rcfproto.so .
Installing the RCFProto Python module
  • From the root directory of the distribution, change directory to the src directory:

  • cd python/src

  • Install the RCFProto Python module (and Google.ProtocolBuffers, if not already installed)::

  • python setup.py install

Running the Python demo server and client
  • From the root directory of the distribution, cd to the demo directory:

  • cd python/demo

  • Generate source code for Protocol Buffer messages:

  • protoc Demo.proto --python_out=.

  • Run the demo server:

  • python DemoServer.py

  • Run the demo client (in a different command prompt):

  • python DemoClient.py