On Sun, Jun 18, 2006 at 06:34:19PM -0500, Michael Ford wrote:
> This is all well for functions found in usrp.py, but even though I import
> usrp.py, and usrp.py successfully imports usrp1.py, I'm unable to
> successfully call functions from usrp1.py (i.e. read_aux_adc()). Calling the
> function with either a usrp- or usrp1- prefix gives me an error of the
> module not having a read_aux_adc attribute.


After creating an instance of the usrp object use the object, 
not the class.   You want to invoke a method of the object.

    [EMAIL PROTECTED] tmp]$ python
    Python 2.4.1 (#1, Sep 13 2005, 00:39:20)
    [GCC 4.0.2 20050901 (prerelease) (SUSE Linux)] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>> from gnuradio import usrp
    >>> u = usrp.source_c(0, 64)
    >>> v = u.read_aux_adc(0, 0)
    >>> print v
    224

You might want to spend a bit of time with the python tutorial at
http://www.python.org/doc 

I prefer the pdf formatted version available here:
http://docs.python.org/download.html

Eric


_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to