[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] Patch for OptionParser backwards compatibility
From: |
Eric Blossom |
Subject: |
Re: [Discuss-gnuradio] Patch for OptionParser backwards compatibility |
Date: |
Tue, 28 Aug 2007 12:11:50 -0700 |
User-agent: |
Mutt/1.5.9i |
On Tue, Aug 28, 2007 at 02:58:40PM -0400, Michael Dickens wrote:
> Someone recently added a "--which" option to the usrp_fft example,
> that works correctly with the OptionParser provided in Python 2.4 or
> newer. But for those using that provided with Python 2.3, it doesn't
> work. Simple fix; here's the patch. - MLD
>
> Index: gnuradio-examples/python/usrp/usrp_fft.py
> ===================================================================
> --- gnuradio-examples/python/usrp/usrp_fft.py (revision 6196)
> +++ gnuradio-examples/python/usrp/usrp_fft.py (working copy)
> @@ -52,7 +52,7 @@
> self.panel = panel
>
> parser = OptionParser(option_class=eng_option)
> - parser.add_option("-w", "--which", type=int, default=0,
> + parser.add_option("-w", "--which", type="int", default=0,
> help="select which USRP (0, 1, ...)
> default is %default",
> metavar="NUM")
> parser.add_option("-R", "--rx-subdev-spec", type="subdev",
> default=None,
Thanks! I've applied it to the trunk.
Eric