AttributeError: 'gr_hier_block2_sptr' object has no attribute 'set_callback'

Dave Angel davea at davea.name
Thu Feb 14 22:39:06 CET 2013


On 02/14/2013 04:16 PM, md123 at nycap.rr.com wrote:
>
> I am using ubuntu 12.10 and python version 2.7.3. i run the following command in terminal:
>
> <snip>

>
> def connect(self, *points):
> """
> Connect two or more block endpoints. An endpoint is either a (block,
> port)
> tuple or a block instance. In the latter case, the port number is
> assumed
> to be zero.
>
> To connect the hierarchical block external inputs or outputs to internal
> block
> inputs or outputs, use 'self' in the connect call.
>
> If multiple arguments are provided, connect will attempt to wire them in
> series,
> interpreting the endpoints as inputs or outputs as appropriate.
> """
>
> if len (points) < 1:
> raise ValueError, ("connect requires at least one endpoint; %d
> provided." % (len (points),))
> else:
> if len(points) == 1:
> self._hb.primitive_connect(points[0].to_basic_block())
> else:
> for i in range (1, len (points)):
> self._connect(points[i-1], points[i])
>
> def _connect(self, src, dst):
> (src_block, src_port) = self._coerce_endpoint(src)
> (dst_block, dst_port) = self._coerce_endpoint(dst)
> self._hb.primitive_connect(src_block.to_basic_block(), src_port,
> dst_block.to_basic_block(), dst_port)

For those of us using text-based email, the program in this message is 
totally unreadable.  This is a text mailing-list, so please put your 
email program in text mode, or you'll lose much of your audience.

Why are you showing us the source to a file from gnuradio library 
module, instead of your own code?



-- 
DaveA



More information about the Python-list mailing list