i get the error
File “/home/jagdish/top_block.py”, line 8, in
from daq import daq_source
ImportError: No module named daq
the daq_source.py , top_block.py and daq_source.xml flies are attached
the block is for gnuradio-comedi.
daq_source.py code
#/usr/bin/env python
from gnuradio import gr,gr_unittest
import comedi
class daq_source(gr.hier_block2):
def init(self, sample_rate):
gr.hier_block2.init(self, ‘daq_source’, gr.io_signature(0,0,0),
gr.io_signature(1,1,gr.sizeof_float))
self.open_daq()
def open_daq(self):
#open device
device = comedi.comedi_open(’/dev/comedi0’)
print “----”
count = comedi.comedi_get_n_subdevices(device)
print "number of sub devices ", count
print “----”
maxdata = comedi.comedi_get_maxdata(device,0, 15);
while (True):
data = comedi.comedi_data_read(device, 0, 15, 0, 0)
print “read data:” , data