# Re: inserting code into top\_block.py

**URL:** <https://www.ruby-forum.com/t/re-inserting-code-into-top-block-py/232196>\
**Category:** GNU Radio\
**Created:** [September 24, 2014, 4:23pm UTC](https://www.ruby-forum.com/t/re-inserting-code-into-top-block-py/232196 "2014-09-24T16:23:39Z")\
**Posts on this page:** 3\
**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:** [September 24, 2014, 4:23pm UTC](https://www.ruby-forum.com/t/re-inserting-code-into-top-block-py/232196/1 "2014-09-24T16:23:39Z")

</div>

Hey All,  
Thanks for the leads and advice.  
Ryan

> > Shouldn’t he “cut” the code?
> > 
> > > - Jeff
> > > 
> > > > > want to have this same functionality without altering the gnuradio  
> > > > > Virginia [http://www.vt.edu/](http://www.vt.edu/) Polytechnic Institute and State
> > > 
> > > [Discuss-gnuradio Info Page](https://lists.gnu.org/mailman/listinfo/discuss-gnuradio)
> 
> –  
> Ryan L. Marlow  
> Research Assistant in CCM Lab [http://ccm.ece.vt.edu](http://ccm.ece.vt.edu)  
> Virginia [http://www.vt.edu/](http://www.vt.edu/) Polytechnic Institute and State University

---

<div class="post-metadata">

**Author:** ![rmac217](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/bc8723/32.png) [@rmac217](https://www.ruby-forum.com/u/rmac217)\
**Post date:** [September 24, 2014, 4:27pm UTC](https://www.ruby-forum.com/t/re-inserting-code-into-top-block-py/232196/2 "2014-09-24T16:27:23Z")

</div>

Just as a follow-up, I have a flow-graph, simple\_ra, that originates in  
GRC, but the Makefile that I use edits the generated code post-facto,

in an automated way, so that it’s reproducible. My use-case is  
trivial–I’m just editing-in a version number into a title string, but  
the

general approach, well, generalizes… 🙂

On 2014-09-24 10:22, Ryan M. wrote:

> > > > > > want to have this same functionality without altering the gnuradio trunk
> > > > > 
> > > > > [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> > > > > Ryan L. Marlow  
> > > > > Research Assistant in CCM Lab [1]
> 
> Virginia [2] Polytechnic Institute and State University
> 
> * * *
> 
> Discuss-gnuradio mailing list  
> [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> [Discuss-gnuradio Info Page](https://lists.gnu.org/mailman/listinfo/discuss-gnuradio) [3]

Links:

---

<div class="post-metadata">

**Author:** ![rmac217](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/bc8723/32.png) [@rmac217](https://www.ruby-forum.com/u/rmac217)\
**Post date:** [September 24, 2014, 4:31pm UTC](https://www.ruby-forum.com/t/re-inserting-code-into-top-block-py/232196/3 "2014-09-24T16:31:45Z")

</div>

How is that Makefile executed? GRC generates the top\_block.py then  
executes  
it. The Makefile would have to edit it before execution right?  
Ryan
