> There's a second problem caused by 
> 
>   from gnuradio import usrp
> 
> in the python code.  This import probes the USB trying to figure out
> what kind of a usrp is out there.  If there's no USRP it fails.
> I should probably just back out the check for the old usrp0's.  The
> 1's and 2's have the same high level interface.

In general I wonder -- is it the practice in Python to have "includes"
run off and do things that could cause errors?  I'm used to more static
languages where if you import a library, it just lays there until you call
it.   :-)   That way, you can parse your arguments and produce your error
messages, and maybe never even call that included package, depending on
the options you were passed.

If Python libraries tend to make trouble when they get imported, maybe
we should be importing them in mid-run, only when we need to, rather
than before doing anything else in the program.

If it was my code, I'd have it run around and look at USB buses the
first time somebody tried to open a USRP -- not before.  But I'm a newbie
to Python.

        John


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

Reply via email to