discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Discuss-gnuradio] Howto Write a Block


From: address@hidden
Subject: [Discuss-gnuradio] Howto Write a Block
Date: Fri, 9 Dec 2005 18:19:24 -0500

I am trying to make a new by following the gr-howto-write-a-block.  I was
able to successfuly make myself a local directory structure with all the
required file and compile the howto_square(2)_ff.cc.

I also so did a 'make check' in the src directory and it work good.

Now the question is how do you make the new function available?

If I run python, I get the following result:

Just to show my path

>>> import sys
>>> sys.path
['', '/home/mrobitaille', '/home/mrobitaille/GRworking/MRTS/src/lib',
'/usr/local/lib/python2.4/site-packages',
'/usr/local/lib/python2.4/site-packages/Numeric',
'/usr/lib/python2.4/site-packages', '/usr/lib/python24.zip',
'/usr/lib/python2.4', '/usr/lib/python2.4/plat-linux2',
'/usr/lib/python2.4/lib-tk', '/usr/lib/python2.4/lib-dynload',
'/usr/lib/python2.4/site-packages/Numeric',
'/usr/lib/python2.4/site-packages/gtk-2.0']

>>> import howto
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "howto.py", line 5, in ?
    import _howto
ImportError: No module named _howto
>>>

I saw one entry on 'howto' and it said to read the README file in
gnuradio-core.
Only thing that I saw was adding a path to LD_LIBRARY_PATH which I did.

As you can see from the above, I have the path  in the PYTHONPATH set
correctly.  

There is also /home/mrobitaille/GRworking/HowTo/src/lib' in my PYTHONPATH
and the directory contains:
howto.cc   howto.py             howto_square2_ff.lo  __init__.py
howto.i    howto.pyc            howto_square_ff.cc   Makefile
_howto.la  howto_square2_ff.cc  howto_square_ff.h    Makefile.am
howto.lo   howto_square2_ff.h   howto_square_ff.lo   Makefile.in

The 'make install' does not seem to do anything.

Is there a bug in the howto example?

There is an howto.py file in the
/usr/local/lib/python2.4/sire-packages/gnuradio but if you do
>>> import gnuradio
>>> dir(gnuradio)
['__builtins__', '__doc__', '__file__', '__name__', '__path__', '_usrp1',
'db_base', 'db_basic', 'db_dbs_rx', 'db_flexrf', 'db_instantiator',
'db_tv_rx', 'eng_notation', 'eng_option', 'gr', 'gru', 'gruimpl', 'usrp',
'usrp1', 'wxgui']

No howto?

How come the __init__.py in the gnuradio does not add howto in the gnuradio
package?

Mike

--------------------------------------------------------------------
mail2web - Check your email from the web at
http://mail2web.com/ .






reply via email to

[Prev in Thread] Current Thread [Next in Thread]