[Top][All Lists]

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

Re: [Discuss-gnuradio] Booting a new USRP

From: John Gilmore
Subject: Re: [Discuss-gnuradio] Booting a new USRP
Date: Sat, 19 Feb 2005 01:21:08 -0800

> 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.


reply via email to

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