diff options
Diffstat (limited to 'grc/python/Generator.py')
-rw-r--r-- | grc/python/Generator.py | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/grc/python/Generator.py b/grc/python/Generator.py index 616ea00fcb..77abc45281 100644 --- a/grc/python/Generator.py +++ b/grc/python/Generator.py @@ -35,8 +35,10 @@ class Generator(object): """ Initialize the generator object. Determine the file to generate. - @param flow_graph the flow graph object - @param file_path the path to write the file to + + Args: + flow_graph: the flow graph object + file_path: the path to write the file to """ self._flow_graph = flow_graph self._generate_options = self._flow_graph.get_option('generate_options') @@ -72,7 +74,9 @@ Add a Misc->Throttle block to your flow graph to avoid CPU congestion.''') def get_popen(self): """ Execute this python flow graph. - @return a popen object + + Returns: + a popen object """ #extract the path to the python executable python_exe = sys.executable @@ -95,12 +99,15 @@ Add a Misc->Throttle block to your flow graph to avoid CPU congestion.''') def __str__(self): """ Convert the flow graph to python code. - @return a string of python code + + Returns: + a string of python code """ title = self._flow_graph.get_option('title') or self._flow_graph.get_option('id').replace('_', ' ').title() imports = self._flow_graph.get_imports() variables = self._flow_graph.get_variables() parameters = self._flow_graph.get_parameters() + monitors = self._flow_graph.get_monitors() #list of blocks not including variables and imports and parameters and disabled def _get_block_sort_text(block): code = block.get_make().replace(block.get_id(), ' ') @@ -140,6 +147,7 @@ Add a Misc->Throttle block to your flow graph to avoid CPU congestion.''') 'flow_graph': self._flow_graph, 'variables': variables, 'parameters': parameters, + 'monitors': monitors, 'blocks': blocks, 'connections': connections, 'messages': messages, |