Hello, I recently got python programs to successfully import the howto module, 
but I cannot use the functions. Any help or suggestions would be greatly 
appreciated:

Python code:
#!/usr/bin/env python

from gnuradio import gr
import howto

class my_top_block(gr.top_block):

    def __init__(self):
        gr.top_block.__init__(self)

        src_nums = (4, 5, 6)
        src = gr.vector_source_f (src_nums)
        sqr = howto.square_ff ()
        dst = gr.vector_sink_f ()
        self.connect (src, sqr)
        self.connect (sqr, dst)
        print "src: ", src
        print "sqr: ", sqr
        print "dst.data: ", dst.data()
        
if __name__ == '__main__':
    my_top_block().run()

Output:
src:  <gr_block vector_source_f (1)>
sqr:  <gr_block square_ff (2)>
dst.data:  ()
Segmentation fault

Thanks,
Mike



      
_______________________________________________
Discuss-gnuradio mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to