commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] r10304 - gnuradio/trunk/grc/src/platforms/python


From: jblum
Subject: [Commit-gnuradio] r10304 - gnuradio/trunk/grc/src/platforms/python
Date: Mon, 26 Jan 2009 13:45:53 -0700 (MST)

Author: jblum
Date: 2009-01-26 13:45:52 -0700 (Mon, 26 Jan 2009)
New Revision: 10304

Modified:
   gnuradio/trunk/grc/src/platforms/python/Generator.py
Log:
-u for unbuffered python exec, fix:callbacks from enabled blocks only

Modified: gnuradio/trunk/grc/src/platforms/python/Generator.py
===================================================================
--- gnuradio/trunk/grc/src/platforms/python/Generator.py        2009-01-26 
13:34:49 UTC (rev 10303)
+++ gnuradio/trunk/grc/src/platforms/python/Generator.py        2009-01-26 
20:45:52 UTC (rev 10304)
@@ -63,7 +63,7 @@
                @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 @@
                #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(





reply via email to

[Prev in Thread] Current Thread [Next in Thread]