# Modifying the top block

**URL:** <https://www.ruby-forum.com/t/modifying-the-top-block/225843>\
**Category:** GNU Radio\
**Created:** [January 31, 2013, 3:40pm UTC](https://www.ruby-forum.com/t/modifying-the-top-block/225843 "2013-01-31T15:40:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![SSkonishi\_takurou\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/bb73d2/32.png) [@SSkonishi\_takurou\_S](https://www.ruby-forum.com/u/SSkonishi_takurou_S)\
**Post date:** [January 31, 2013, 3:40pm UTC](https://www.ruby-forum.com/t/modifying-the-top-block/225843/1 "2013-01-31T15:40:33Z")

</div>

Hi everyone,  
I created some blocks using c++, gr\_modtools and used GRC in order to  
define the functionality. Now I need to pass parameters to the graph by  
console. I used as example wfm\_rx\_block so as to get the OptionParser  
functionality. The problem is that is not working, when I use one of the  
options I supposedly defined, I get:

Usage: top\_block.py: [options]

top\_block.py: error: no such option: -F

I put the OptionParser after the variables are declared and before the  
blocks

If anyone knows where can I find some documentation or tutorial for what  
I am doing it would be great.

Thanks

* * *

Este documento puede contener informacin privilegiada o confidencial.  
Por tanto, usar esta informacin y sus anexos para propsitos ajenos a los  
de la Universidad Icesi, divulgarla a personas a las cuales no se  
encuentre destinado este correo o reproducirla total o parcialmente, se  
encuentra prohibido en virtud de la legislacin vigente. La universidad  
no asumir responsabilidad sobre informacin, opiniones o criterios  
contenidos en este correo que no estn directamente relacionados con la  
Icesi. Si usted no es el destinatario autorizado o por error recibe este  
mensaje, por favor informe al remitente y posteriormente brrelo de su  
sistema sin conservar copia del mismo.

---

<div class="post-metadata">

**Author:** ![juan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/a698b9/32.png) [@juan](https://www.ruby-forum.com/u/juan)\
**Post date:** [January 31, 2013, 10:36pm UTC](https://www.ruby-forum.com/t/modifying-the-top-block/225843/2 "2013-01-31T22:36:38Z")

</div>

Have you looked up the Python docs for that module?

[http://docs.python.org/2/library/optparse.html](http://docs.python.org/2/library/optparse.html)

Cheers,  
Ben

On Thu, Jan 31, 2013 at 6:39 AM, Juan Daniel Fernandez M. \<
