[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 03/08: grc: gnuradio-companion use Argument
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 03/08: grc: gnuradio-companion use ArgumentParser |
Date: |
Wed, 11 May 2016 17:41:08 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
jcorgan pushed a commit to branch next
in repository gnuradio.
commit 83411579705f43a30a68df5179fe507398a0555a
Author: Jiří Pinkava <address@hidden>
Date: Sat Oct 10 20:56:20 2015 +0200
grc: gnuradio-companion use ArgumentParser
---
grc/main.py | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/grc/main.py b/grc/main.py
index ae7a0ce..0edab40 100755
--- a/grc/main.py
+++ b/grc/main.py
@@ -15,7 +15,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
USA
-import optparse
+import argparse
import gtk
from gnuradio import gr
@@ -34,10 +34,10 @@ This is free software, and you are welcome to redistribute
it.
def main():
- parser = optparse.OptionParser(
- usage='usage: %prog [options] [saved flow graphs]',
- version=VERSION_AND_DISCLAIMER_TEMPLATE % gr.version())
- options, args = parser.parse_args()
+ parser = argparse.ArgumentParser(
+ description=VERSION_AND_DISCLAIMER_TEMPLATE % gr.version())
+ parser.add_argument('flow_graphs', nargs='*')
+ args = parser.parse_args()
try:
gtk.window_set_default_icon(gtk.IconTheme().load_icon('gnuradio-grc',
256, 0))
@@ -50,6 +50,6 @@ def main():
version_parts=(gr.major_version(), gr.api_version(),
gr.minor_version()),
install_prefix=gr.prefix()
)
- ActionHandler(args, platform)
+ ActionHandler(args.flow_graphs, platform)
gtk.main()
- [Commit-gnuradio] [gnuradio] branch next updated (493a19e -> 02b6805), git, 2016/05/11
- [Commit-gnuradio] [gnuradio] 01/08: examples: affinity_set use ArgParse, git, 2016/05/11
- [Commit-gnuradio] [gnuradio] 07/08: Merge branch 'master' into next, git, 2016/05/11
- [Commit-gnuradio] [gnuradio] 08/08: Merge remote-tracking branch 'pinkavaj/argparse-01' into next, git, 2016/05/11
- [Commit-gnuradio] [gnuradio] 03/08: grc: gnuradio-companion use ArgumentParser,
git <=
- [Commit-gnuradio] [gnuradio] 06/08: examples: run_synthetic.py use ArgumentParser, git, 2016/05/11
- [Commit-gnuradio] [gnuradio] 04/08: grc: flow graph templates use ArgumentParser, git, 2016/05/11
- [Commit-gnuradio] [gnuradio] 02/08: examples: plot_flops use ArgumentParser, git, 2016/05/11
- [Commit-gnuradio] [gnuradio] 05/08: grcc: replace OptionParser by ArgumentParser, git, 2016/05/11