discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] usrp_basic and gr_block


From: Michael Ford
Subject: Re: [Discuss-gnuradio] usrp_basic and gr_block
Date: Sun, 18 Jun 2006 18:34:19 -0500

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.

On 6/18/06, Eric Blossom <address@hidden> wrote:
On Sun, Jun 18, 2006 at 02:18:01PM -0500, Michael Ford wrote:
> after setting the PYTHONPATH variable to point to ~/gr-build/gr-usrp/src/
> (where usrp1.py is located), I ran my python test script, and got the
> following error:
>
>
> $ python test_sender.py Traceback (most recent call last):
>  File "test_sender.py", line 22, in ?
>    import usrp1
>  File "/home/mford1/gr-build/gr-usrp/src/usrp1.py", line 4, in ?
>    import _usrp1
> ImportError: No module named _usrp1
>
> After searching my computer, I find that there is in fact no module called
> _usrp1, only a libtool file in the ~/gr-build/gr-usrp/src/ directory called
> usrp1.la. I'm guessing there might be something wrong with my installation.
>
> -Michael Ford-

Don't do it that way ;)

Just install gr-usrp as usual, then write your test script someplace
else.  To import the usrp code, do like all of the examples:

  from gnuradio import usrp

  u = usrp.source_c (...)


You may want to take a look at the code in gnuradio-examples/python/usrp

Eric


reply via email to

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