# GNU Radio Python execution from C++

**URL:** <https://www.ruby-forum.com/t/gnu-radio-python-execution-from-c/231527>\
**Category:** GNU Radio\
**Created:** [August 13, 2014, 3:45pm UTC](https://www.ruby-forum.com/t/gnu-radio-python-execution-from-c/231527 "2014-08-13T15:45:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![addis\_a](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/c4cdca/32.png) [@addis\_a](https://www.ruby-forum.com/u/addis_a)\
**Post date:** [August 13, 2014, 3:45pm UTC](https://www.ruby-forum.com/t/gnu-radio-python-execution-from-c/231527/1 "2014-08-13T15:45:08Z")

</div>

I want to start up and control GNU Radio top\_block.py from a C++ class I  
have written. My thought was to execlp() python on the top\_block.py  
file. I run into a problem because I do not have a good way to kill GNU  
Radio from my class short of sending a SIGINT. How do you recommend I do  
things?

I’m somewhat new to GNU Radio and Python and imagine there are better  
way to do things. I realize I can code my radios directly by coding in  
C++ or Python, but I want to allow users to run GRC GUI to define the  
radios so I want to use the GRC file to describe the radio and generate  
the Python file using grcc.

---

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [August 13, 2014, 7:08pm UTC](https://www.ruby-forum.com/t/gnu-radio-python-execution-from-c/231527/2 "2014-08-13T19:08:22Z")

</div>

Hi Mark,

in many cases, you should just construct your top\_block in C++, start()  
and stop() it from there and leave python alone.

Greetings,  
Marcus
