summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjblum2009-01-26 20:45:52 +0000
committerjblum2009-01-26 20:45:52 +0000
commit381eea6c45b640fdfbf4b4ba167583f1390b9ac2 (patch)
treecd65e316ec877e2383f97af99ac1f10513429cb8
parent7730c688af61a49cd754e441be5222b959a6fec4 (diff)
downloadgnuradio-381eea6c45b640fdfbf4b4ba167583f1390b9ac2.tar.gz
gnuradio-381eea6c45b640fdfbf4b4ba167583f1390b9ac2.tar.bz2
gnuradio-381eea6c45b640fdfbf4b4ba167583f1390b9ac2.zip
-u for unbuffered python exec, fix:callbacks from enabled blocks only
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@10304 221aa14e-8319-0410-a670-987f0aec2ac5
-rw-r--r--grc/src/platforms/python/Generator.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/grc/src/platforms/python/Generator.py b/grc/src/platforms/python/Generator.py
index 7879fdfc0..5d3a13872 100644
--- a/grc/src/platforms/python/Generator.py
+++ b/grc/src/platforms/python/Generator.py
@@ -63,7 +63,7 @@ class Generator(object):
@return a popen object
"""
#execute
- cmds = [PYEXEC, self.get_file_path()]
+ cmds = [PYEXEC, '-u', self.get_file_path()] #-u is unbuffered stdio
if self._generate_options == 'no_gui':
cmds = ['xterm', '-e'] + cmds
p = subprocess.Popen(args=cmds, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=False, universal_newlines=True)
@@ -90,7 +90,7 @@ class Generator(object):
#list of callbacks (prepend self.)
callbacks = [
expr_utils.expr_prepend(cb, var_ids, 'self.')
- for cb in sum([block.get_callbacks() for block in self._flow_graph.get_blocks()], [])
+ for cb in sum([block.get_callbacks() for block in self._flow_graph.get_enabled_blocks()], [])
]
#map var id to the expression (prepend self.)
var_id2expr = dict(