[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 07/10: grc: add description to the optparse
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 07/10: grc: add description to the optparse call |
Date: |
Thu, 14 Apr 2016 20:43:08 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
jcorgan pushed a commit to branch master
in repository gnuradio.
commit 79f6dc8b3e1d63efb514b3704c7b0ca60aa46c2e
Author: Chris Kuethe <address@hidden>
Date: Mon Apr 11 19:32:00 2016 -0700
grc: add description to the optparse call
this allows the "Description" field from the GRC Options block to
set the program description to something helpful when you run
./my_gnuradio_program.py --help
---
grc/python/flow_graph.tmpl | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/grc/python/flow_graph.tmpl b/grc/python/flow_graph.tmpl
index bd8025b..ecdb893 100644
--- a/grc/python/flow_graph.tmpl
+++ b/grc/python/flow_graph.tmpl
@@ -274,8 +274,8 @@ gr.io_signaturev($(len($io_sigs)), $(len($io_sigs)), [$(',
'.join($size_strs))])
self.settings = Qt.QSettings("GNU Radio", "$class_name")
self.settings.setValue("geometry", self.saveGeometry())
event.accept()
-
#if $flow_graph.get_option('qt_qss_theme')
+
def setStyleSheetFromFile(self, filename):
try:
if not os.path.exists(filename):
@@ -336,7 +336,12 @@ $short_id#slurp
def argument_parser():
- parser = OptionParser(option_class=eng_option, usage="%prog: [options]")
+ #set $desc_args = 'usage="%prog: [options]", option_class=eng_option'
+ #if $flow_graph.get_option('description')
+ #set $desc_args += ', description=description'
+ description = $repr($flow_graph.get_option('description'))
+ #end if
+ parser = OptionParser($desc_args)
#for $param in $parameters
#set $type = $param.get_param('type').get_value()
#if $type
- [Commit-gnuradio] [gnuradio] branch master updated (0ac619e -> 6f1dcdf), git, 2016/04/14
- [Commit-gnuradio] [gnuradio] 01/10: grc: add select all action, git, 2016/04/14
- [Commit-gnuradio] [gnuradio] 02/10: grc: move blks2 code into gr-blocks and gr-digital, git, 2016/04/14
- [Commit-gnuradio] [gnuradio] 09/10: Merge remote-tracking branch 'mhostetter/master', git, 2016/04/14
- [Commit-gnuradio] [gnuradio] 08/10: Merge remote-tracking branch 'gnuradio-wg-grc/master_grcwg', git, 2016/04/14
- [Commit-gnuradio] [gnuradio] 06/10: digital: add QA test for tagged stream version of correlate_access_code, git, 2016/04/14
- [Commit-gnuradio] [gnuradio] 05/10: Added CMake code to find a PyBOMBS installation target and install the OOT module there., git, 2016/04/14
- [Commit-gnuradio] [gnuradio] 04/10: grc: move xmlrpc blocks to gr-blocks, git, 2016/04/14
- [Commit-gnuradio] [gnuradio] 07/10: grc: add description to the optparse call,
git <=
- [Commit-gnuradio] [gnuradio] 03/10: grc: mark blks2 blocks as deprecated, git, 2016/04/14
- [Commit-gnuradio] [gnuradio] 10/10: Merge remote-tracking branch 'nowls/qa_corr_access_code_ts', git, 2016/04/14