[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Discuss-gnuradio] ImportError: no module named

From: patiljagdish154
Subject: [Discuss-gnuradio] ImportError: no module named
Date: Tue, 2 Aug 2011 04:15:27 -0700 (PDT)

i get the error

 File "/home/jagdish/top_block.py", line 8, in <module>
    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),


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

http://old.nabble.com/file/p32177038/daq_source.xml daq_source.xml 
http://old.nabble.com/file/p32177038/daq_source.py daq_source.py 
http://old.nabble.com/file/p32177038/top_block.py top_block.py 
View this message in context: 
Sent from the GnuRadio mailing list archive at Nabble.com.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]