[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Discuss-gnuradio] Patch for OptionParser backwards compatibility
From: |
Michael Dickens |
Subject: |
[Discuss-gnuradio] Patch for OptionParser backwards compatibility |
Date: |
Tue, 28 Aug 2007 14:58:40 -0400 |
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,
- [Discuss-gnuradio] Patch for OptionParser backwards compatibility,
Michael Dickens <=