Fwd: Problem loading Python block

I’m not sure what you mean by “load gr.basic_block.” Do you mean inherit
from?

I want to make my block which very similar to packet deframer. Here is
th
code:

class packet_tst(gr.hier_block2):

        access_code = packet_utils.default_access_code

    self.framer_sink = gr.framer_sink_1(msgq)
    self.connect(self, self.correlator, self.framer_sink)

    self.hlp_blk = helper_block(msgq)

in the same file is also defined class helper_block in this way:

class helper_block(gr.basic_block):

    while True:
        try: msg = self._msgq.delete_head()
        except: return -1
        print "Message received"

when I try to run test or flowgraph, I get this error:

in

class helper_block(gr.basic_block):

AttributeError: ‘module’ object has no attribute ‘basic_block’
– Process completed
***Failed

0% tests passed, 1 tests failed out of 1

And in tutorial on how to write signal processing block, it is stated to
use gr.basic_block.

On Tue, Jan 29, 2013 at 1:25 PM, Tom R. [email protected] wrote:

/dev/null.
parser = OptionParser(usage=Templates[‘usage’],

was using script downloaded from github this morning (just to clarifu how

from gnuradio import gr

=

        self.connect(self.gr_message_source_0, self)

        self.src_data = ()

wrote:
complaints to /dev

  File "/usr/local/bin/gr_modtool.py", line 1324, in _write_tpl
    self._compile(source, file,

Line|Python Code
125 |        if _v is not None: write(_filter(_v,

43  |#end if
On Fri, Jan 25, 2013 at 9:22 PM, Nemanja S. <

explain to

lags a bit

        >

so inside

        > sent by framer from the main block.
        >     tb = top_block()
        __init__.py file:
        >     import test
        >
        > Thanks
        >
        Kaiserstraße 12
        _______________________________________________
    Nemanja Savić


Karlsruhe Institute of Technology (KIT)
Fax: +49 721 608-46071


Nemanja Savić

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs