# Developing with C++ but not python

**URL:** <https://www.ruby-forum.com/t/developing-with-c-but-not-python/226909>\
**Category:** GNU Radio\
**Created:** [February 25, 2013, 2:27pm UTC](https://www.ruby-forum.com/t/developing-with-c-but-not-python/226909 "2013-02-25T14:27:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gong\_Z](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/d07c76/32.png) [@Gong\_Z](https://www.ruby-forum.com/u/Gong_Z)\
**Post date:** [February 25, 2013, 2:27pm UTC](https://www.ruby-forum.com/t/developing-with-c-but-not-python/226909/1 "2013-02-25T14:27:34Z")

</div>

Hi,  
I think python file means data go downstream without interacting  
with other data stream.And I have seen several example writen in c++ and  
they all contain a gr\_top\_block which makes them similar to python  
files.Any body have the experience developing in c++?And what you think  
is the major difficulity(except more effort) compared to python?  
Thanks.

---

<div class="post-metadata">

**Author:** ![Gong\_Z](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/d07c76/32.png) [@Gong\_Z](https://www.ruby-forum.com/u/Gong_Z)\
**Post date:** [February 25, 2013, 2:51pm UTC](https://www.ruby-forum.com/t/developing-with-c-but-not-python/226909/2 "2013-02-25T14:51:32Z")

</div>

> Hi,  
> I think python file means data go downstream without interacting  
> with other data stream.And I have seen several example writen in c++ and  
> they all contain a gr\_top\_block which makes them similar to python  
> files.Any body have the experience developing in c++?And what you think  
> is the major difficulity(except more effort) compared to python?  
> Thanks.

Hi,

I am not completely sure I understood your question, but as far as I can  
tell you are concerned about running python next to C++ (I guess for  
performance reasons.)

The core GNURadio application, also the top\_blocks are C++ code, so all  
the data processing and data passing is done in compiled C++ code  
(Unless  
you decide to write blocks in python of course).  
Python is only used for setup and connection purposes and use  
automatically generated wrappers for the C++ code (so you call shared  
C++  
libraries from python). See also these two FAQs  
[http://gnuradio.org/redmine/projects/gnuradio/wiki/FAQ#Why-bother-with-Python-I-just-want-to-code-in-C](http://gnuradio.org/redmine/projects/gnuradio/wiki/FAQ#Why-bother-with-Python-I-just-want-to-code-in-C)

Martin

---

<div class="post-metadata">

**Author:** ![Gong\_Z](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/d07c76/32.png) [@Gong\_Z](https://www.ruby-forum.com/u/Gong_Z)\
**Post date:** [February 25, 2013, 2:53pm UTC](https://www.ruby-forum.com/t/developing-with-c-but-not-python/226909/3 "2013-02-25T14:53:18Z")

</div>

On Mon, Feb 25, 2013 at 09:26:22PM +0800, Gong Z. wrote:

> Hi,  
> I think python file means data go downstream without interacting  
> with other data stream.And I have seen several example writen in c++  
> and they all contain a gr\_top\_block which makes them similar to  
> python files.Any body have the experience developing in c++?And what  
> you think is the major difficulity(except more effort) compared to  
> python?

Yep, that’s the major difference. Also, don’t forget that there are some  
blocks only available in Python.

MB

–  
Karlsruhe Institute of Technology (KIT)  
Communications Engineering Lab (CEL)

Dipl.-Ing. Martin B.  
Research Associate

Kaiserstraße 12  
Building 05.01  
76131 Karlsruhe

Phone: +49 721 608-43790  
Fax: +49 721 608-46071  
www.cel.kit.edu

KIT – University of the State of Baden-Württemberg and  
National Laboratory of the Helmholtz Association
