Importing Grblock or not?

Hi Josh,

As you said that the work of grblock has already been merged to your
next
branch, I am little confusing that how to use grblock.
Previously, we installed grblock as a separate module, and in the
application code we need to import grblock explicitly. And the
directory /usr/local/lib/python2.7/dist-packages
contains a dedicated directory grblock.
If I build and install the gnuradio based on your next branch, do we
still
need use “import grblock” in the application code?

Alex,
Dreams can come true just believe.

If I build and install the gnuradio based on your next branch, do we still
need use “import grblock” in the application code?

No, the old module “grblock” is gone, the work is now integrated into
“gnuradio.gr”. Did you see the examples here:
http://gnuradio.org/redmine/projects/gnuradio/wiki/WriteBlocksInPython#Some-quick-examples

If you solve your build issue with boost, please let me know. I am
interested to understand the cause.

-Josh

For the boost issue, unitl now, I think the most likely cause is due to
incorrect installation of my boost. I manually compiled a boost 1.47 and
copy the related lib files to the /usr/local/lib and /usr/lib. But the
ubunut 11.10 could have already built-in boost of the other older
version.
If so, the confilict could happen. I need to verify if this is my
problem.

I can successfully cmake/make/make install in anthother PC with a fresh
ubuntu 11.10, from the code of your next branch.

On Wed, Nov 23, 2011 at 9:44 AM, Josh B. [email protected] wrote:

http://gnuradio.org/redmine/projects/gnuradio/wiki/WriteBlocksInPython#Some-quick-examples

If you solve your build issue with boost, please let me know. I am
interested to understand the cause.

-Josh

Alex,
Dreams can come true just believe.

With 90% possibility, my building issue of boost is caused by the
conflict
between the built-in boost library and the post installed boost libs.
After removing all the libboost* in the /usr/lib/ and changing
environmental value LD_LIBRARY_PATH by delete the path to my
self-installed
boost directory, I re-installed the boost by
sudo apt-get install libboost-dev libboost-doc
Now the next branch can be build successfully.

On Wed, Nov 23, 2011 at 9:44 AM, Josh B. [email protected] wrote:

http://gnuradio.org/redmine/projects/gnuradio/wiki/WriteBlocksInPython#Some-quick-examples

If you solve your build issue with boost, please let me know. I am
interested to understand the cause.

-Josh

Alex,
Dreams can come true just believe.

Hi guys!

I have problems with writing a processing block in python. I looked at
the
examples here
http://gnuradio.org/redmine/projects/gnuradio/wiki/WriteBlocksInPython
but
when I try to create a new class that inherits gr.sync_block (or any
other
from the example) I get this output:

Traceback (most recent call last):
File “./python_processing_block”, line 27, in
class add_2_f32_1_f32(gr.sync_block):
AttributeError: ‘module’ object has no attribute ‘sync_block’

I wrote the signal processing block in C++ where I created a class that
inherits gr_block and it work fine. Is there some module that I should
import or am I missing something else?

Best regards,
Urban K.

On 12/14/2011 08:07 AM, Urban K. wrote:

class add_2_f32_1_f32(gr.sync_block):

AttributeError: ‘module’ object has no attribute ‘sync_block’

I wrote the signal processing block in C++ where I created a class that
inherits gr_block and it work fine. Is there some module that I should
import or am I missing something else?

This feature is not in mainline. Its part of my next branch. I also
squashed the work (without message passing) into python_blocks branch.
http://gnuradio.org/cgit/jblum.git

-Josh